aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_protocols.h16
-rw-r--r--src/include/gnunet_rps_service.h25
2 files changed, 41 insertions, 0 deletions
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index 4400db7e1..56e049608 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -2993,6 +2993,22 @@ extern "C"
2993#define GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_VIEW_CANCEL 1132 2993#define GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_VIEW_CANCEL 1132
2994 2994
2995 2995
2996/**
2997 * @brief Request biased input stream
2998 */
2999#define GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_STREAM_REQUEST 1133
3000
3001/**
3002 * @brief Send peer of biased stream
3003 */
3004#define GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_STREAM_REPLY 1134
3005
3006/**
3007 * @brief Cancel getting biased strem
3008 */
3009#define GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_STREAM_CANCEL 1135
3010
3011
2996 3012
2997/** 3013/**
2998 * Next available: 1200 3014 * Next available: 1200
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 *