From bae0066688e7571b4abdebfb914dba6df0578a6b Mon Sep 17 00:00:00 2001 From: Julius Bünger Date: Sun, 2 Aug 2015 14:48:28 +0000 Subject: cancellation of request and according test improvements --- src/rps/gnunet-service-rps_sampler.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/rps/gnunet-service-rps_sampler.h') 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 @@ */ struct RPS_Sampler; +/** + * A handle to cancel a request. + */ +struct RPS_SamplerRequestHandle; + /** * 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, * #GNUNET_NO if used internally * @param num_peers the number of peers requested */ - void +struct RPS_SamplerRequestHandle * RPS_sampler_get_n_rand_peers (struct RPS_Sampler *sampler, RPS_sampler_n_rand_peers_ready_cb cb, void *cls, uint32_t num_peers); +/** + * Cancle a request issued through #RPS_sampler_n_rand_peers_ready_cb. + * + * @param req_handle the handle to the request + */ +void +RPS_sampler_request_cancel (struct RPS_SamplerRequestHandle *req_handle); + /** * Counts how many Samplers currently hold a given PeerID. -- cgit v1.2.3