aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_rps_service.h
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2018-09-14 00:38:45 +0200
committerJulius Bünger <buenger@mytum.de>2018-09-14 00:38:45 +0200
commite91d46cdbbc97414968fa751fd1f596757c56875 (patch)
tree9edf5fdb72671a479e10a67b35ca7c83718cc7c0 /src/include/gnunet_rps_service.h
parent60229aa0287024714cebb4a267ea732a883e8812 (diff)
downloadgnunet-e91d46cdbbc97414968fa751fd1f596757c56875.tar.gz
gnunet-e91d46cdbbc97414968fa751fd1f596757c56875.zip
Add API call to receive unbiased peer stream for debugging and profiling
Diffstat (limited to 'src/include/gnunet_rps_service.h')
-rw-r--r--src/include/gnunet_rps_service.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/include/gnunet_rps_service.h b/src/include/gnunet_rps_service.h
index b0c8c9867..252188c62 100644
--- a/src/include/gnunet_rps_service.h
+++ b/src/include/gnunet_rps_service.h
@@ -74,6 +74,14 @@ typedef void (* GNUNET_RPS_ViewUpdateCB) (void *cls,
74 const struct GNUNET_PeerIdentity *peers); 74 const struct GNUNET_PeerIdentity *peers);
75 75
76/** 76/**
77 * Callback called when a peer from the biased stream was received
78 *
79 * @param peer The received peer
80 */
81typedef void (* GNUNET_RPS_StreamInputCB) (void *cls,
82 const struct GNUNET_PeerIdentity *peer);
83
84/**
77 * Connect to the rps service 85 * Connect to the rps service
78 * 86 *
79 * @param cfg configuration to use 87 * @param cfg configuration to use
@@ -161,6 +169,23 @@ GNUNET_RPS_view_request (struct GNUNET_RPS_Handle *rps_handle,
161 GNUNET_RPS_ViewUpdateCB view_update_cb, 169 GNUNET_RPS_ViewUpdateCB view_update_cb,
162 void *cls); 170 void *cls);
163 171
172
173/**
174 * Request biased stream of peers that are being put into the sampler
175 *
176 * @param rps_handle handle to the rps service
177 * @param num_req_peers number of peers we want to receive
178 * (0 for infinite updates)
179 * @param cls a closure that will be given to the callback
180 * @param ready_cb the callback called when the peers are available
181 */
182void
183GNUNET_RPS_stream_request (struct GNUNET_RPS_Handle *rps_handle,
184 uint32_t num_updates,
185 GNUNET_RPS_StreamInputCB stream_input_cb,
186 void *cls);
187
188
164/** 189/**
165 * Disconnect from the rps service 190 * Disconnect from the rps service
166 * 191 *