aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_core_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-07-30 22:27:18 +0000
committerChristian Grothoff <christian@grothoff.org>2016-07-30 22:27:18 +0000
commitc4f4203aaff577fdbe60a7a0976e913dbb77f03e (patch)
tree2fca5cb9cdc7b8c8d046c81453313c275d7dd5cd /src/include/gnunet_core_service.h
parente9dbabbabb9edd41bb7d7cb907826abdd8edb257 (diff)
downloadgnunet-c4f4203aaff577fdbe60a7a0976e913dbb77f03e.tar.gz
gnunet-c4f4203aaff577fdbe60a7a0976e913dbb77f03e.zip
enable setting per-envelope or per-queue transmission options with MQ API
Diffstat (limited to 'src/include/gnunet_core_service.h')
-rw-r--r--src/include/gnunet_core_service.h44
1 files changed, 40 insertions, 4 deletions
diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h
index fa74415d6..6ec486b26 100644
--- a/src/include/gnunet_core_service.h
+++ b/src/include/gnunet_core_service.h
@@ -247,6 +247,16 @@ GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
247 int outbound_hdr_only, 247 int outbound_hdr_only,
248 const struct GNUNET_CORE_MessageHandler *handlers); 248 const struct GNUNET_CORE_MessageHandler *handlers);
249 249
250/**
251 * Disconnect from the core service. This function can only
252 * be called *after* all pending #GNUNET_CORE_notify_transmit_ready
253 * requests have been explicitly cancelled.
254 *
255 * @param handle connection to core to disconnect
256 */
257void
258GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle);
259
250 260
251/** 261/**
252 * Connect to the core service. Note that the connection may complete 262 * Connect to the core service. Note that the connection may complete
@@ -282,14 +292,40 @@ GNUNET_CORE_connecT (const struct GNUNET_CONFIGURATION_Handle *cfg,
282 292
283 293
284/** 294/**
285 * Disconnect from the core service. This function can only 295 * Disconnect from the core service.
286 * be called *after* all pending #GNUNET_CORE_notify_transmit_ready
287 * requests have been explicitly cancelled.
288 * 296 *
289 * @param handle connection to core to disconnect 297 * @param handle connection to core to disconnect
290 */ 298 */
291void 299void
292GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle); 300GNUNET_CORE_disconnecT (struct GNUNET_CORE_Handle *handle);
301
302
303/**
304 * Inquire with CORE what options should be set for a message
305 * so that it is transmitted with the given @a priority and
306 * the given @a cork value.
307 *
308 * @param cork desired corking
309 * @param priority desired message priority
310 * @param[out] flags set to `flags` value for #GNUNET_MQ_set_options()
311 * @return `extra` argument to give to #GNUNET_MQ_set_options()
312 */
313const void *
314GNUNET_CORE_get_mq_options (int cork,
315 enum GNUNET_CORE_Priority priority,
316 uint64_t *flags);
317
318
319/**
320 * Obtain the message queue for a connected peer.
321 *
322 * @param h the core handle
323 * @param pid the identity of the peer
324 * @return NULL if @a pid is not connected
325 */
326struct GNUNET_MQ_Handle *
327GNUNET_CORE_get_mq (const struct GNUNET_CORE_Handle *h,
328 const struct GNUNET_PeerIdentity *pid);
293 329
294 330
295/** 331/**