doxy
[oweals/gnunet.git] / src / include / gnunet_mesh_service.h
index e1cd030052ab4bdbb53352932ff288c96c7dbfd9..b674e5d7637cab50fee76f33fb6fbda5aa764a6d 100644 (file)
@@ -154,9 +154,6 @@ typedef uint32_t GNUNET_MESH_ApplicationType;
  * Connect to the mesh service.
  *
  * @param cfg configuration to use
- * @param queue_size size of the data message queue, shared among all tunnels
- *                   (each tunnel is guaranteed to accept at least one message,
- *                    no matter what is the status of other tunnels)
  * @param cls closure for the various callbacks that follow
  *            (including handlers in the handlers array)
  * @param new_tunnel function called when an *inbound* tunnel is created
@@ -172,8 +169,7 @@ typedef uint32_t GNUNET_MESH_ApplicationType;
  *         (in this case, init is never called)
  */
 struct GNUNET_MESH_Handle *
-GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
-                     unsigned int queue_size, void *cls,
+GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, void *cls,
                      GNUNET_MESH_InboundTunnelNotificationHandler new_tunnel,
                      GNUNET_MESH_TunnelEndHandler cleaner,
                      const struct GNUNET_MESH_MessageHandler *handlers,
@@ -285,6 +281,17 @@ void
 GNUNET_MESH_tunnel_speed_max (struct GNUNET_MESH_Tunnel *tunnel);
 
 
+/**
+ * Turn on/off the buffering status of the tunnel.
+ * 
+ * @param tunnel Tunnel affected.
+ * @param buffer GNUNET_YES to turn buffering on (default),
+ *               GNUNET_NO otherwise.
+ */
+void
+GNUNET_MESH_tunnel_buffer (struct GNUNET_MESH_Tunnel *tunnel, int buffer);
+
+
 /**
  * Request that a peer should be added to the tunnel.  The connect handler
  * will be called when the peer connects
@@ -370,10 +377,11 @@ struct GNUNET_MESH_TransmitHandle;
 /**
  * Ask the mesh to call "notify" once it is ready to transmit the
  * given number of bytes to the specified tunnel or target.
+ * Only one call can be active at any time, to issue another request,
+ * wait for the callback or cancel the current request.
  *
  * @param tunnel tunnel to use for transmission
  * @param cork is corking allowed for this transmission?
- * @param priority how important is the message?
  * @param maxdelay how long can the message wait?
  * @param target destination for the message
  *               NULL for multicast to all tunnel targets
@@ -389,7 +397,6 @@ struct GNUNET_MESH_TransmitHandle;
  */
 struct GNUNET_MESH_TransmitHandle *
 GNUNET_MESH_notify_transmit_ready (struct GNUNET_MESH_Tunnel *tunnel, int cork,
-                                   uint32_t priority,
                                    struct GNUNET_TIME_Relative maxdelay,
                                    const struct GNUNET_PeerIdentity *target,
                                    size_t notify_size,