aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_mesh_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_mesh_service.h')
-rw-r--r--src/include/gnunet_mesh_service.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/include/gnunet_mesh_service.h b/src/include/gnunet_mesh_service.h
index 9d2562de8..08748d87b 100644
--- a/src/include/gnunet_mesh_service.h
+++ b/src/include/gnunet_mesh_service.h
@@ -95,7 +95,7 @@ enum MeshTunnelOption
95/** 95/**
96 * Functions with this signature are called whenever a message is 96 * Functions with this signature are called whenever a message is
97 * received. 97 * received.
98 * 98 *
99 * Each time the function must call #GNUNET_MESH_receive_done on the tunnel 99 * Each time the function must call #GNUNET_MESH_receive_done on the tunnel
100 * in order to receive the next message. This doesn't need to be immediate: 100 * in order to receive the next message. This doesn't need to be immediate:
101 * can be delayed if some processing is done on the message. 101 * can be delayed if some processing is done on the message.
@@ -104,7 +104,7 @@ enum MeshTunnelOption
104 * @param tunnel Connection to the other end. 104 * @param tunnel Connection to the other end.
105 * @param tunnel_ctx Place to store local state associated with the tunnel. 105 * @param tunnel_ctx Place to store local state associated with the tunnel.
106 * @param message The actual message. 106 * @param message The actual message.
107 * 107 *
108 * @return #GNUNET_OK to keep the tunnel open, 108 * @return #GNUNET_OK to keep the tunnel open,
109 * #GNUNET_SYSERR to close it (signal serious error). 109 * #GNUNET_SYSERR to close it (signal serious error).
110 */ 110 */
@@ -164,8 +164,8 @@ typedef void *(GNUNET_MESH_InboundTunnelNotificationHandler) (void *cls,
164 164
165/** 165/**
166 * Function called whenever a tunnel is destroyed. Should clean up 166 * Function called whenever a tunnel is destroyed. Should clean up
167 * any associated state. 167 * any associated state.
168 * 168 *
169 * It must NOT call #GNUNET_MESH_tunnel_destroy on the tunnel. 169 * It must NOT call #GNUNET_MESH_tunnel_destroy on the tunnel.
170 * 170 *
171 * @param cls closure (set from #GNUNET_MESH_connect) 171 * @param cls closure (set from #GNUNET_MESH_connect)
@@ -182,7 +182,7 @@ typedef void (GNUNET_MESH_TunnelEndHandler) (void *cls,
182 * Connect to the mesh service. 182 * Connect to the mesh service.
183 * 183 *
184 * @param cfg Configuration to use. 184 * @param cfg Configuration to use.
185 * @param cls Closure for the various callbacks that follow (including 185 * @param cls Closure for the various callbacks that follow (including
186 * handlers in the handlers array). 186 * handlers in the handlers array).
187 * @param new_tunnel Function called when an *incoming* tunnel is created. 187 * @param new_tunnel Function called when an *incoming* tunnel is created.
188 * Can be NULL if no inbound tunnels are desired. 188 * Can be NULL if no inbound tunnels are desired.
@@ -193,15 +193,15 @@ typedef void (GNUNET_MESH_TunnelEndHandler) (void *cls,
193 * @param handlers Callbacks for messages we care about, NULL-terminated. Each 193 * @param handlers Callbacks for messages we care about, NULL-terminated. Each
194 * one must call #GNUNET_MESH_receive_done on the tunnel to 194 * one must call #GNUNET_MESH_receive_done on the tunnel to
195 * receive the next message. Messages of a type that is not 195 * receive the next message. Messages of a type that is not
196 * in the handlers array are ignored if received. 196 * in the handlers array are ignored if received.
197 * @param ports NULL or 0-terminated array of port numbers for incoming tunnels. 197 * @param ports NULL or 0-terminated array of port numbers for incoming tunnels.
198 * See @c new_tunnel. 198 * See @c new_tunnel.
199 * 199 *
200 * @return handle to the mesh service NULL on error 200 * @return handle to the mesh service NULL on error
201 * (in this case, init is never called) 201 * (in this case, init is never called)
202 */ 202 */
203struct GNUNET_MESH_Handle * 203struct GNUNET_MESH_Handle *
204GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, 204GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
205 void *cls, 205 void *cls,
206 GNUNET_MESH_InboundTunnelNotificationHandler new_tunnel, 206 GNUNET_MESH_InboundTunnelNotificationHandler new_tunnel,
207 GNUNET_MESH_TunnelEndHandler cleaner, 207 GNUNET_MESH_TunnelEndHandler cleaner,
@@ -234,7 +234,7 @@ GNUNET_MESH_disconnect (struct GNUNET_MESH_Handle *handle);
234 * @return handle to the tunnel 234 * @return handle to the tunnel
235 */ 235 */
236struct GNUNET_MESH_Tunnel * 236struct GNUNET_MESH_Tunnel *
237GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h, 237GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h,
238 void *tunnel_ctx, 238 void *tunnel_ctx,
239 const struct GNUNET_PeerIdentity *peer, 239 const struct GNUNET_PeerIdentity *peer,
240 uint32_t port, 240 uint32_t port,
@@ -244,7 +244,7 @@ GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h,
244 244
245/** 245/**
246 * Destroy an existing tunnel. 246 * Destroy an existing tunnel.
247 * 247 *
248 * The existing end callback for the tunnel will be called immediately. 248 * The existing end callback for the tunnel will be called immediately.
249 * Any pending outgoing messages will be sent but no incoming messages will be 249 * Any pending outgoing messages will be sent but no incoming messages will be
250 * accepted and no data callbacks will be called. 250 * accepted and no data callbacks will be called.
@@ -258,7 +258,7 @@ GNUNET_MESH_tunnel_destroy (struct GNUNET_MESH_Tunnel *tunnel);
258/** 258/**
259 * Struct to retrieve info about a tunnel. 259 * Struct to retrieve info about a tunnel.
260 */ 260 */
261union GNUNET_MESH_TunnelInfo 261union GNUNET_MESH_TunnelInfo
262{ 262{
263 263
264 /** 264 /**
@@ -332,7 +332,7 @@ GNUNET_MESH_notify_transmit_ready_cancel (struct GNUNET_MESH_TransmitHandle
332 332
333/** 333/**
334 * Indicate readiness to receive the next message on a tunnel. 334 * Indicate readiness to receive the next message on a tunnel.
335 * 335 *
336 * Should only be called once per handler called. 336 * Should only be called once per handler called.
337 * 337 *
338 * @param tunnel Tunnel that will be allowed to call another handler. 338 * @param tunnel Tunnel that will be allowed to call another handler.