gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r16380 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r16380 - gnunet/src/transport
Date: Thu, 4 Aug 2011 23:05:33 +0200

Author: grothoff
Date: 2011-08-04 23:05:33 +0200 (Thu, 04 Aug 2011)
New Revision: 16380

Modified:
   gnunet/src/transport/gnunet-service-transport-new.c
   gnunet/src/transport/gnunet-service-transport_clients.c
   gnunet/src/transport/gnunet-service-transport_clients.h
Log:
improved client API

Modified: gnunet/src/transport/gnunet-service-transport-new.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport-new.c 2011-08-04 20:50:36 UTC 
(rev 16379)
+++ gnunet/src/transport/gnunet-service-transport-new.c 2011-08-04 21:05:33 UTC 
(rev 16380)
@@ -79,7 +79,7 @@
 process_hello_update (void *cls,
                      const struct GNUNET_MessageHeader *hello)
 {
-  GST_clients_broadcast (hello);
+  GST_clients_broadcast (hello, GNUNET_NO);
 #if 0
   GNUNET_CONTAINER_multihashmap_iterate (neighbours,
                                         &transmit_our_hello_if_pong,

Modified: gnunet/src/transport/gnunet-service-transport_clients.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_clients.c     2011-08-04 
20:50:36 UTC (rev 16379)
+++ gnunet/src/transport/gnunet-service-transport_clients.c     2011-08-04 
21:05:33 UTC (rev 16380)
@@ -47,16 +47,128 @@
 }
 
 
+
 /**
+ * Initialize a normal client.  We got an init message from this
+ * client, add him to the list of clients for broadcasting of inbound
+ * messages.
+ *
+ * @param cls unused
+ * @param client the client
+ * @param message the init message that was sent
+ */
+void
+GST_clients_handle_init (void *cls,
+                        struct GNUNET_SERVER_Client *client,
+                        const struct GNUNET_MessageHeader *message)
+{
+}
+
+
+/**
+ * Client asked for transmission to a peer.  Process the request.
+ *
+ * @param cls unused
+ * @param client the client
+ * @param message the send message that was sent
+ */
+void
+GST_clients_handle_send (void *cls,
+                        struct GNUNET_SERVER_Client *client,
+                        const struct GNUNET_MessageHeader *message)
+{
+}
+
+
+/**
+ * Client asked for a quota change for a particular peer.  Process the request.
+ *
+ * @param cls unused
+ * @param client the client
+ * @param message the quota changing message
+ */
+void
+GST_clients_handle_set_quota (void *cls,
+                             struct GNUNET_SERVER_Client *client,
+                             const struct GNUNET_MessageHeader *message)
+{
+}
+
+
+/**
+ * Client asked to resolve an address.  Process the request.
+ *
+ * @param cls unused
+ * @param client the client
+ * @param message the resolution request
+ */
+void
+GST_clients_handle_address_lookup (void *cls,
+                                  struct GNUNET_SERVER_Client *client,
+                                  const struct GNUNET_MessageHeader *message)
+{
+}
+
+
+/**
+ * Client asked to obtain information about a peer's addresses.
+ * Process the request.
+ *
+ * @param cls unused
+ * @param client the client
+ * @param message the peer address information request
+ */
+void
+GST_clients_handle_peer_address_lookup (void *cls,
+                                       struct GNUNET_SERVER_Client *client,
+                                       const struct GNUNET_MessageHeader 
*message)
+{
+}
+
+
+/**
+ * Client asked to obtain information about all addresses.
+ * Process the request.
+ *
+ * @param cls unused
+ * @param client the client
+ * @param message the peer address information request
+ */
+void
+GST_clients_handle_address_iterate (void *cls,
+                                   struct GNUNET_SERVER_Client *client,
+                                   const struct GNUNET_MessageHeader *message)
+{
+}
+
+
+/**
  * Broadcast the given message to all of our clients.
  *
  * @param msg message to broadcast
+ * @param candrop GNUNET_YES if the message can be dropped
  */
 void
-GST_clients_broadcast (const struct GNUNET_MessageHeader *msg)
+GST_clients_broadcast (const struct GNUNET_MessageHeader *msg,
+                      int candrop)
 {
   
 }
 
 
+/**
+ * Send the given message to a particular client
+ *
+ * @param client target of the message
+ * @param msg message to transmit
+ * @param candrop GNUNET_YES if the message can be dropped
+ */
+void
+GST_clients_unicast (struct GNUNET_SERVER_Client *client,
+                    const struct GNUNET_MessageHeader *msg,
+                    int candrop)
+{
+}
+
+
 /* end of file gnunet-service-transport_clients.c */

Modified: gnunet/src/transport/gnunet-service-transport_clients.h
===================================================================
--- gnunet/src/transport/gnunet-service-transport_clients.h     2011-08-04 
20:50:36 UTC (rev 16379)
+++ gnunet/src/transport/gnunet-service-transport_clients.h     2011-08-04 
21:05:33 UTC (rev 16380)
@@ -47,14 +47,111 @@
 
 
 /**
+ * Initialize a normal client.  We got an init message from this
+ * client, add him to the list of clients for broadcasting of inbound
+ * messages.
+ *
+ * @param cls unused
+ * @param client the client
+ * @param message the init message that was sent
+ */
+void
+GST_clients_handle_init (void *cls,
+                        struct GNUNET_SERVER_Client *client,
+                        const struct GNUNET_MessageHeader *message);
+
+
+/**
+ * Client asked for transmission to a peer.  Process the request.
+ *
+ * @param cls unused
+ * @param client the client
+ * @param message the send message that was sent
+ */
+void
+GST_clients_handle_send (void *cls,
+                        struct GNUNET_SERVER_Client *client,
+                        const struct GNUNET_MessageHeader *message);
+
+
+/**
+ * Client asked for a quota change for a particular peer.  Process the request.
+ *
+ * @param cls unused
+ * @param client the client
+ * @param message the quota changing message
+ */
+void
+GST_clients_handle_set_quota (void *cls,
+                             struct GNUNET_SERVER_Client *client,
+                             const struct GNUNET_MessageHeader *message);
+
+
+/**
+ * Client asked to resolve an address.  Process the request.
+ *
+ * @param cls unused
+ * @param client the client
+ * @param message the resolution request
+ */
+void
+GST_clients_handle_address_lookup (void *cls,
+                                  struct GNUNET_SERVER_Client *client,
+                                  const struct GNUNET_MessageHeader *message);
+
+
+/**
+ * Client asked to obtain information about a peer's addresses.
+ * Process the request.
+ *
+ * @param cls unused
+ * @param client the client
+ * @param message the peer address information request
+ */
+void
+GST_clients_handle_peer_address_lookup (void *cls,
+                                       struct GNUNET_SERVER_Client *client,
+                                       const struct GNUNET_MessageHeader 
*message);
+
+
+/**
+ * Client asked to obtain information about all addresses.
+ * Process the request.
+ *
+ * @param cls unused
+ * @param client the client
+ * @param message the peer address information request
+ */
+void
+GST_clients_handle_address_iterate (void *cls,
+                                   struct GNUNET_SERVER_Client *client,
+                                   const struct GNUNET_MessageHeader *message);
+
+
+/**
  * Broadcast the given message to all of our clients.
  *
  * @param msg message to broadcast
+ * @param candrop GNUNET_YES if the message can be dropped
  */
 void
-GST_clients_broadcast (const struct GNUNET_MessageHeader *msg);
+GST_clients_broadcast (const struct GNUNET_MessageHeader *msg,
+                      int candrop);
 
 
+/**
+ * Send the given message to a particular client
+ *
+ * @param client target of the message
+ * @param msg message to transmit
+ * @param candrop GNUNET_YES if the message can be dropped
+ */
+void
+GST_clients_unicast (struct GNUNET_SERVER_Client *client,
+                    const struct GNUNET_MessageHeader *msg,
+                    int candrop);
 
+
+
 #endif
 /* end of file gnunet-service-transport_clients.h */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]