remove max buffer size from headers
authorNathan S. Evans <evans@in.tum.de>
Fri, 2 Jul 2010 13:01:23 +0000 (13:01 +0000)
committerNathan S. Evans <evans@in.tum.de>
Fri, 2 Jul 2010 13:01:23 +0000 (13:01 +0000)
src/include/gnunet_connection_lib.h
src/include/gnunet_server_lib.h

index 8bca5baa6f9bc577d403dab837dd77e1aec3b1ca..d5942236b57c8c29a6a1223a3df07c58a2b08fa7 100644 (file)
@@ -101,8 +101,6 @@ GNUNET_CONNECTION_persist_(struct GNUNET_CONNECTION_Handle *sock);
  *
  * @param sched scheduler to use
  * @param osSocket existing socket to box
- * @param maxbuf maximum write buffer size for the socket (use
- *        0 for sockets that need no write buffers, such as listen sockets)
  * @return the boxed socket handle
  */
 struct GNUNET_CONNECTION_Handle
@@ -111,7 +109,7 @@ struct GNUNET_CONNECTION_Handle
                                                    *sched,
                                                    struct
                                                    GNUNET_NETWORK_Handle
-                                                   *osSocket, size_t maxbuf);
+                                                   *osSocket);
 
 
 /**
@@ -122,8 +120,6 @@ struct GNUNET_CONNECTION_Handle
  * @param access function to use to check if access is allowed
  * @param access_cls closure for access
  * @param lsock listen socket
- * @param maxbuf maximum write buffer size for the socket (use
- *        0 for sockets that need no write buffers, such as listen sockets)
  * @return the socket handle, NULL on error (for example, access refused)
  */
 struct GNUNET_CONNECTION_Handle
@@ -134,7 +130,7 @@ struct GNUNET_CONNECTION_Handle
                                                  access, void *access_cls,
                                                  struct
                                                  GNUNET_NETWORK_Handle
-                                                 *lsock, size_t maxbuf);
+                                                 *lsock);
 
 
 /**
@@ -146,16 +142,13 @@ struct GNUNET_CONNECTION_Handle
  * @param cfg configuration to use
  * @param hostname name of the host to connect to
  * @param port port to connect to
- * @param maxbuf maximum write buffer size for the socket (use
- *        0 for sockets that need no write buffers, such as listen sockets)
  * @return the socket handle
  */
 struct GNUNET_CONNECTION_Handle
   *GNUNET_CONNECTION_create_from_connect (struct GNUNET_SCHEDULER_Handle *sched,
                                          const struct GNUNET_CONFIGURATION_Handle *cfg,
                                          const char *hostname,
-                                         uint16_t port,
-                                         size_t maxbuf);
+                                         uint16_t port);
 
 
 /**
@@ -165,17 +158,14 @@ struct GNUNET_CONNECTION_Handle
  *
  * @param sched scheduler to use
  * @param cfg configuration to use
- * @param unixpath path to connect to
- * @param maxbuf maximum write buffer size for the socket (use
- *        0 for sockets that need no write buffers, such as listen sockets)
+ * @param unixpath path to connect to)
  * @return the socket handle, NULL on systems without UNIX support
  */
 struct GNUNET_CONNECTION_Handle *
 GNUNET_CONNECTION_create_from_connect_to_unixpath (struct GNUNET_SCHEDULER_Handle *sched,
                                                   const struct
                                                   GNUNET_CONFIGURATION_Handle *cfg,
-                                                  const char *unixpath,
-                                                  size_t maxbuf);
+                                                  const char *unixpath);
 
 
 
@@ -189,8 +179,6 @@ GNUNET_CONNECTION_create_from_connect_to_unixpath (struct GNUNET_SCHEDULER_Handl
  * @param af_family address family to use
  * @param serv_addr server address
  * @param addrlen length of server address
- * @param maxbuf maximum write buffer size for the socket (use
- *        0 for sockets that need no write buffers, such as listen sockets)
  * @return the socket handle
  */
 struct GNUNET_CONNECTION_Handle
@@ -199,8 +187,7 @@ struct GNUNET_CONNECTION_Handle
                                                    *sched, int af_family,
                                                    const struct sockaddr
                                                    *serv_addr,
-                                                   socklen_t addrlen,
-                                                   size_t maxbuf);
+                                                   socklen_t addrlen);
 
 /**
  * Check if socket is valid (no fatal errors have happened so far).
@@ -306,7 +293,7 @@ struct GNUNET_CONNECTION_TransmitHandle;
  * are free in the transmission buffer.  May call the notify
  * method immediately if enough space is available.  Note that
  * this function will abort if "size" is greater than
- * "maxbuf" (as specified when the socket handle was created).
+ * GNUNET_SERVER_MAX_MESSAGE_SIZE.
  *
  * Note that "notify" will be called either when enough
  * buffer space is available OR when the socket is destroyed.
@@ -332,13 +319,13 @@ struct GNUNET_CONNECTION_TransmitHandle;
  */
 struct GNUNET_CONNECTION_TransmitHandle
   *GNUNET_CONNECTION_notify_transmit_ready (struct
-                                                    GNUNET_CONNECTION_Handle
-                                                    *sock, size_t size,
-                                                    struct
-                                                    GNUNET_TIME_Relative
-                                                    timeout,
-                                                    GNUNET_CONNECTION_TransmitReadyNotify
-                                                    notify, void *notify_cls);
+                                            GNUNET_CONNECTION_Handle
+                                            *sock, size_t size,
+                                            struct
+                                            GNUNET_TIME_Relative
+                                            timeout,
+                                            GNUNET_CONNECTION_TransmitReadyNotify
+                                            notify, void *notify_cls);
 
 
 /**
index 554458e45e78dba2cd4a9c478ebeda4ea8036dc4..20ed78baba2202246b1b745652ccfc11c3c448b5 100644 (file)
@@ -119,7 +119,6 @@ struct GNUNET_SERVER_MessageHandler
  * @param access function for access control
  * @param access_cls closure for access
  * @param lsocks NULL-terminated array of listen sockets
- * @param maxbuf maximum write buffer size for accepted sockets
  * @param idle_timeout after how long should we timeout idle connections?
  * @param require_found if YES, connections sending messages of unknown type
  *        will be closed
@@ -130,7 +129,6 @@ struct GNUNET_SERVER_Handle *
 GNUNET_SERVER_create_with_sockets (struct GNUNET_SCHEDULER_Handle *sched,
                                   GNUNET_CONNECTION_AccessCheck access, void *access_cls,
                                   struct GNUNET_NETWORK_Handle **lsocks,
-                                  size_t maxbuf,
                                   struct GNUNET_TIME_Relative
                                   idle_timeout,
                                   int require_found);
@@ -143,7 +141,6 @@ GNUNET_SERVER_create_with_sockets (struct GNUNET_SCHEDULER_Handle *sched,
  * @param access_cls closure for access
  * @param serverAddr address toes listen on (including port), NULL terminated array
  * @param socklen lengths of respective serverAddr 
- * @param maxbuf maximum write buffer size for accepted sockets
  * @param idle_timeout after how long should we timeout idle connections?
  * @param require_found if YES, connections sending messages of unknown type
  *        will be closed
@@ -157,7 +154,6 @@ struct GNUNET_SERVER_Handle *GNUNET_SERVER_create (struct
                                                    access, void *access_cls,
                                                   struct sockaddr *const*serverAddr,
                                                    const socklen_t *socklen,
-                                                   size_t maxbuf,
                                                    struct GNUNET_TIME_Relative
                                                    idle_timeout,
                                                    int require_found);
@@ -546,15 +542,12 @@ typedef void (*GNUNET_SERVER_MessageTokenizerCallback) (void *cls,
 /**
  * Create a message stream tokenizer.
  *
- * @param maxbuf maximum message size to support (typically
- *    GNUNET_SERVER_MAX_MESSAGE_SIZE)
  * @param cb function to call on completed messages
  * @param cb_cls closure for cb
  * @return handle to tokenizer
  */
 struct GNUNET_SERVER_MessageStreamTokenizer *
-GNUNET_SERVER_mst_create (size_t maxbuf,
-                         GNUNET_SERVER_MessageTokenizerCallback cb,
+GNUNET_SERVER_mst_create (GNUNET_SERVER_MessageTokenizerCallback cb,
                          void *cb_cls);