[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r31148 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r31148 - gnunet/src/mesh |
Date: |
Fri, 6 Dec 2013 15:55:21 +0100 |
Author: bartpolot
Date: 2013-12-06 15:55:21 +0100 (Fri, 06 Dec 2013)
New Revision: 31148
Modified:
gnunet/src/mesh/gnunet-mesh.c
Log:
- wip
Modified: gnunet/src/mesh/gnunet-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-mesh.c 2013-12-06 14:54:40 UTC (rev 31147)
+++ gnunet/src/mesh/gnunet-mesh.c 2013-12-06 14:55:21 UTC (rev 31148)
@@ -98,6 +98,56 @@
/**
+ * Function called whenever a channel is destroyed. Should clean up
+ * any associated state.
+ *
+ * It must NOT call #GNUNET_MESH_channel_destroy on the channel.
+ *
+ * @param cls closure (set from #GNUNET_MESH_connect)
+ * @param channel connection to the other end (henceforth invalid)
+ * @param channel_ctx place where local state associated
+ * with the channel is stored
+ */
+static void
+channel_ended (void *cls,
+ const struct GNUNET_MESH_Channel *channel,
+ void *channel_ctx)
+{
+ FPRINTF (stdout, "Channel ended!\n");
+}
+
+
+/**
+ * Method called whenever another peer has added us to a channel
+ * the other peer initiated.
+ * Only called (once) upon reception of data with a message type which was
+ * subscribed to in #GNUNET_MESH_connect.
+ *
+ * A call to #GNUNET_MESH_channel_destroy causes te channel to be ignored. In
+ * this case the handler MUST return NULL.
+ *
+ * @param cls closure
+ * @param channel new handle to the channel
+ * @param initiator peer that started the channel
+ * @param port Port this channel is for.
+ * @param options MeshOption flag field, with all active option bits set to 1.
+ *
+ * @return initial channel context for the channel
+ * (can be NULL -- that's not an error)
+ */
+void *
+channel_incoming (void *cls,
+ struct GNUNET_MESH_Channel * channel,
+ const struct GNUNET_PeerIdentity * initiator,
+ uint32_t port, enum MeshOption options)
+{
+ FPRINTF (stdout, "Incoming channel!\n");
+ return NULL;
+}
+
+
+
+/**
* Call MESH's monitor API, get info of one connection.
*
* @param cls Closure (unused).
@@ -234,38 +284,7 @@
}
-
/**
- * Method called whenever another peer has added us to a channel
- * the other peer initiated.
- * Only called (once) upon reception of data with a message type which was
- * subscribed to in #GNUNET_MESH_connect.
- *
- * A call to #GNUNET_MESH_channel_destroy causes te channel to be ignored. In
- * this case the handler MUST return NULL.
- *
- * @param cls closure
- * @param channel new handle to the channel
- * @param initiator peer that started the channel
- * @param port Port this channel is for.
- * @param options MeshOption flag field, with all active option bits set to 1.
- *
- * @return initial channel context for the channel
- * (can be NULL -- that's not an error)
- */
-void *
-incoming_channel (void *cls,
- struct GNUNET_MESH_Channel * channel,
- const struct GNUNET_PeerIdentity * initiator,
- uint32_t port, enum MeshOption options)
-{
- FPRINTF (stdout, "Incoming channel!\n");
- return NULL;
-}
-
-
-
-/**
* Main function that will be run by the scheduler.
*
* @param cls closure
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r31148 - gnunet/src/mesh,
gnunet <=