diff options
author | Julius Bünger <buenger@mytum.de> | 2015-08-02 14:48:28 +0000 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2015-08-02 14:48:28 +0000 |
commit | bae0066688e7571b4abdebfb914dba6df0578a6b (patch) | |
tree | 4ee2b2171170d169ff8cd55cfe5ad9adf640d5d2 /src/rps/gnunet-service-rps_sampler.h | |
parent | 847e9575ed85eadb979bc416afec7cf898cf00d1 (diff) | |
download | gnunet-bae0066688e7571b4abdebfb914dba6df0578a6b.tar.gz gnunet-bae0066688e7571b4abdebfb914dba6df0578a6b.zip |
cancellation of request and according test improvements
Diffstat (limited to 'src/rps/gnunet-service-rps_sampler.h')
-rw-r--r-- | src/rps/gnunet-service-rps_sampler.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/rps/gnunet-service-rps_sampler.h b/src/rps/gnunet-service-rps_sampler.h index 83705b013..f33e7430c 100644 --- a/src/rps/gnunet-service-rps_sampler.h +++ b/src/rps/gnunet-service-rps_sampler.h | |||
@@ -34,6 +34,11 @@ | |||
34 | */ | 34 | */ |
35 | struct RPS_Sampler; | 35 | struct RPS_Sampler; |
36 | 36 | ||
37 | /** | ||
38 | * A handle to cancel a request. | ||
39 | */ | ||
40 | struct RPS_SamplerRequestHandle; | ||
41 | |||
37 | 42 | ||
38 | /** | 43 | /** |
39 | * Callback that is called from _get_n_rand_peers() when the PeerIDs are ready. | 44 | * Callback that is called from _get_n_rand_peers() when the PeerIDs are ready. |
@@ -130,11 +135,19 @@ RPS_sampler_reinitialise_by_value (struct RPS_Sampler *sampler, | |||
130 | * #GNUNET_NO if used internally | 135 | * #GNUNET_NO if used internally |
131 | * @param num_peers the number of peers requested | 136 | * @param num_peers the number of peers requested |
132 | */ | 137 | */ |
133 | void | 138 | struct RPS_SamplerRequestHandle * |
134 | RPS_sampler_get_n_rand_peers (struct RPS_Sampler *sampler, | 139 | RPS_sampler_get_n_rand_peers (struct RPS_Sampler *sampler, |
135 | RPS_sampler_n_rand_peers_ready_cb cb, | 140 | RPS_sampler_n_rand_peers_ready_cb cb, |
136 | void *cls, uint32_t num_peers); | 141 | void *cls, uint32_t num_peers); |
137 | 142 | ||
143 | /** | ||
144 | * Cancle a request issued through #RPS_sampler_n_rand_peers_ready_cb. | ||
145 | * | ||
146 | * @param req_handle the handle to the request | ||
147 | */ | ||
148 | void | ||
149 | RPS_sampler_request_cancel (struct RPS_SamplerRequestHandle *req_handle); | ||
150 | |||
138 | 151 | ||
139 | /** | 152 | /** |
140 | * Counts how many Samplers currently hold a given PeerID. | 153 | * Counts how many Samplers currently hold a given PeerID. |