[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r29451 - in gnunet/src: include multicast
From: |
gnunet |
Subject: |
[GNUnet-SVN] r29451 - in gnunet/src: include multicast |
Date: |
Sat, 21 Sep 2013 12:22:37 +0200 |
Author: grothoff
Date: 2013-09-21 12:22:37 +0200 (Sat, 21 Sep 2013)
New Revision: 29451
Modified:
gnunet/src/include/gnunet_multicast_service.h
gnunet/src/multicast/multicast.h
gnunet/src/multicast/multicast_api.c
Log:
-more issues with multicast API
Modified: gnunet/src/include/gnunet_multicast_service.h
===================================================================
--- gnunet/src/include/gnunet_multicast_service.h 2013-09-21 10:05:30 UTC
(rev 29450)
+++ gnunet/src/include/gnunet_multicast_service.h 2013-09-21 10:22:37 UTC
(rev 29451)
@@ -259,6 +259,13 @@
* Function called whenever a group member has transmitted a request
* to the origin (other than joining or leaving).
*
+ * FIXME: need to distinguish between origin cancelling a message (some
fragments
+ * were sent, then the rest 'discarded') and the case where we got
disconnected;
+ * right now, both would mean 'msg' is NULL, but they could be quite
different...
+ * So the semantics from the receiver side of
+ * GNUNET_MULTICAST_member_to_origin_cancel() are not clear here. Maybe we
+ * should do something with the flags in this case?
+ *
* @param cls Closure (set from GNUNET_MULTICAST_origin_start).
* @param sender Identity of the sender.
* @param req Request to the origin.
@@ -279,6 +286,12 @@
* response of the @e origin (as given to GNUNET_MULTICAST_join_decision()) and
* then a second time with NULL to indicate that the connection failed for
good.
*
+ * FIXME: need to distinguish between origin cancelling a message (some
fragments
+ * were sent, then the rest 'discarded') and the case where we got
disconnected;
+ * right now, both would mean 'msg' is NULL, but they could be quite
different...
+ * So the semantics from the receiver side of
+ * GNUNET_MULTICAST_origin_to_all_cancel() are not clear here.
+ *
* @param cls Closure (set from GNUNET_MULTICAST_member_join())
* @param msg Message from the origin, NULL if the origin shut down
* (or we were kicked out, and we should thus call
@@ -705,6 +718,7 @@
* @param member Membership handle.
* @param message_id Application layer ID for the message. Opaque to
multicast.
* @param size Number of bytes we want to send to origin.
+ * FIXME: this should probably be a uint64_t?
* @param notify Callback to call to get the message.
* @param notify_cls Closure for @a notify.
* @return Handle to cancel request, NULL on error (i.e. request already
pending).
Modified: gnunet/src/multicast/multicast.h
===================================================================
--- gnunet/src/multicast/multicast.h 2013-09-21 10:05:30 UTC (rev 29450)
+++ gnunet/src/multicast/multicast.h 2013-09-21 10:22:37 UTC (rev 29451)
@@ -243,7 +243,9 @@
{
/**
- *
+ * The message type can be either
+ * #GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST or
+ * #GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST_CANCEL.
*/
struct GNUNET_MessageHeader header;
@@ -253,17 +255,17 @@
uint32_t uid;
/**
- *
+ * ID of the message that is being requested.
*/
uint64_t message_id;
/**
- *
+ * Offset of the fragment that is being requested.
*/
uint64_t fragment_offset;
/**
- *
+ * Additional flags for the request.
*/
uint64_t flags;
@@ -271,8 +273,65 @@
+/**
+ * Message sent from the client to the service to unicast to the group origin.
+ */
+struct MulticastUnicastToOriginMessage
+{
+ /**
+ *
+ */
+ struct GNUNET_MessageHeader header;
+ /**
+ * Reserved (always 0).
+ */
+ uint32_t reserved;
+
+ /**
+ * Message ID.
+ */
+ uint64_t message_id;
+
+ /**
+ * Total message size.
+ */
+ uint64_t total_size;
+
+ /* followed by payload */
+
+};
+
+
+/**
+ * Message sent from the client to the service to
+ * cancel unicast to the group origin.
+ */
+struct MulticastUnicastToOriginCancelMessage
+{
+
+ /**
+ *
+ */
+ struct GNUNET_MessageHeader header;
+
+ /**
+ * Reserved (always 0).
+ */
+ uint32_t reserved;
+
+ /**
+ * Message ID.
+ */
+ uint64_t message_id;
+
+};
+
+
+
+
+
GNUNET_NETWORK_STRUCT_END
#endif
Modified: gnunet/src/multicast/multicast_api.c
===================================================================
--- gnunet/src/multicast/multicast_api.c 2013-09-21 10:05:30 UTC (rev
29450)
+++ gnunet/src/multicast/multicast_api.c 2013-09-21 10:22:37 UTC (rev
29451)
@@ -515,7 +515,8 @@
*
* @param member Membership handle.
* @param message_id Application layer ID for the message. Opaque to
multicast.
- * @param size Number of bytes we want to send to origin.
+ * @param size Number of bytes we want to send to origin.
+ * FIXME: this should probably be a uint64_t?
* @param notify Callback to call to get the message.
* @param notify_cls Closure for @a notify.
* @return Handle to cancel request, NULL on error (i.e. request already
pending).
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r29451 - in gnunet/src: include multicast,
gnunet <=