X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Finclude%2Fgnunet_mesh_service.h;h=b71c055b597a7057e6698748cdb544026a4a871a;hb=6b2fb63de633b086a91e7733ca0dd5591198c20c;hp=0497cee2fe63787ed7b53ec3a51498571142159e;hpb=302e8874b89fb670a9dfdc5992ac6c9b20f2122d;p=oweals%2Fgnunet.git diff --git a/src/include/gnunet_mesh_service.h b/src/include/gnunet_mesh_service.h index 0497cee2f..b71c055b5 100644 --- a/src/include/gnunet_mesh_service.h +++ b/src/include/gnunet_mesh_service.h @@ -74,9 +74,8 @@ typedef int (*GNUNET_MESH_MessageCallback) (void *cls, sender, const struct GNUNET_MessageHeader * message, - const struct - GNUNET_ATS_Information * - atsi); + const struct GNUNET_ATS_Information + * atsi); /** @@ -130,7 +129,9 @@ typedef void *(GNUNET_MESH_InboundTunnelNotificationHandler) (void *cls, /** * Function called whenever an inbound tunnel is destroyed. Should clean up - * any associated state. + * any associated state. This function is NOT called if the client has + * explicitly asked for the tunnel to be destroyed using + * GNUNET_MESH_tunnel_destroy. * * @param cls closure (set from GNUNET_MESH_connect) * @param tunnel connection to the other end (henceforth invalid) @@ -187,6 +188,10 @@ GNUNET_MESH_disconnect (struct GNUNET_MESH_Handle *handle); /** * Method called whenever a peer has disconnected from the tunnel. + * Implementations of this callback must NOT call + * GNUNET_MESH_tunnel_destroy immediately, but instead schedule those + * to run in some other task later. However, calling + * "GNUNET_MESH_notify_transmit_ready_cancel" is allowed. * * @param cls closure * @param peer peer identity the tunnel stopped working with @@ -198,18 +203,18 @@ typedef void (*GNUNET_MESH_PeerDisconnectHandler) (void *cls, /** * Method called whenever a peer has connected to the tunnel. - * TODO: change to typedef int? to let client allow the new peer or not * * @param cls closure * @param peer peer identity the tunnel was created to, NULL on timeout * @param atsi performance data for the connection + * + * TODO: change to return int to let client allow the new peer or not? */ typedef void (*GNUNET_MESH_PeerConnectHandler) (void *cls, const struct GNUNET_PeerIdentity * peer, const struct - GNUNET_ATS_Information - * atsi); + GNUNET_ATS_Information * atsi);