diff options
Diffstat (limited to 'src/include/gnunet_rps_service.h')
-rw-r--r-- | src/include/gnunet_rps_service.h | 25 |
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 | */ | ||
81 | typedef 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 | */ | ||
182 | void | ||
183 | GNUNET_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 | * |