gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r27208 - in libmicrohttpd: . doc src/include src/microhttpd


From: gnunet
Subject: [GNUnet-SVN] r27208 - in libmicrohttpd: . doc src/include src/microhttpd
Date: Mon, 20 May 2013 12:30:32 +0200

Author: grothoff
Date: 2013-05-20 12:30:32 +0200 (Mon, 20 May 2013)
New Revision: 27208

Modified:
   libmicrohttpd/ChangeLog
   libmicrohttpd/doc/libmicrohttpd.texi
   libmicrohttpd/src/include/microhttpd.h
   libmicrohttpd/src/microhttpd/connection.c
Log:
-fix 2886

Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog     2013-05-19 09:31:16 UTC (rev 27207)
+++ libmicrohttpd/ChangeLog     2013-05-20 10:30:32 UTC (rev 27208)
@@ -1,3 +1,8 @@
+Mon May 20 12:29:35 CEST 2013
+       Added MHD_CONNECTION_INFO_CONNECTION_FD to allow clients
+       direct access to connection socket; useful for COMET
+       applications that need to disable NAGLE (#2886). -CG
+
 Mon May 15 12:49:01 CEST 2013
        Fixing #2859. -CG
 

Modified: libmicrohttpd/doc/libmicrohttpd.texi
===================================================================
--- libmicrohttpd/doc/libmicrohttpd.texi        2013-05-19 09:31:16 UTC (rev 
27207)
+++ libmicrohttpd/doc/libmicrohttpd.texi        2013-05-20 10:30:32 UTC (rev 
27208)
@@ -2138,6 +2138,18 @@
 Returns information about @code{struct MHD_Daemon} which manages
 this connection.
 
address@hidden MHD_CONNECTION_INFO_CONNECTION_FD
+Returns the file descriptor (usually a TCP socket) associated with
+this connection (in the ``connect-fd'' member of the returned struct).
+Note that manipulating the descriptor directly can have problematic
+consequences (as in, break HTTP).  Applications might use this access
+to manipulate TCP options, for example to set the ``TCP-NODELAY''
+option for COMET-like applications.  Note that MHD will set TCP-CORK
+after sending the HTTP header and clear it after finishing the footers
+automatically (if the platform supports it).  As the connection
+callbacks are invoked in between, those might be used to set different
+values for TCP-CORK and TCP-NODELAY in the meantime.
+
 @end table
 @end deftp
 

Modified: libmicrohttpd/src/include/microhttpd.h
===================================================================
--- libmicrohttpd/src/include/microhttpd.h      2013-05-19 09:31:16 UTC (rev 
27207)
+++ libmicrohttpd/src/include/microhttpd.h      2013-05-20 10:30:32 UTC (rev 
27208)
@@ -791,8 +791,15 @@
   /**
    * Get the 'struct MHD_Daemon' responsible for managing this connection.
    */
-  MHD_CONNECTION_INFO_DAEMON
+  MHD_CONNECTION_INFO_DAEMON,
 
+
+  /**
+   * Request the file descriptor for the listening socket.
+   * No extra arguments should be passed.
+   */
+  MHD_CONNECTION_INFO_CONNECTION_FD
+
 };
 
 
@@ -1852,6 +1859,11 @@
   int /* enum gnutls_protocol */ protocol;
 
   /**
+   * Connect socket 
+   */
+  int connect_fd;
+
+  /**
    * GNUtls session handle, of type "gnutls_session_t".
    */
   void * /* gnutls_session_t */ tls_session;

Modified: libmicrohttpd/src/microhttpd/connection.c
===================================================================
--- libmicrohttpd/src/microhttpd/connection.c   2013-05-19 09:31:16 UTC (rev 
27207)
+++ libmicrohttpd/src/microhttpd/connection.c   2013-05-20 10:30:32 UTC (rev 
27208)
@@ -2555,6 +2555,8 @@
       return (const union MHD_ConnectionInfo *) &connection->addr;
     case MHD_CONNECTION_INFO_DAEMON:
       return (const union MHD_ConnectionInfo *) &connection->daemon;
+    case MHD_CONNECTION_INFO_CONNECTION_FD:
+      return (const union MHD_ConnectionInfo *) &connection->socket_fd;
     default:
       return NULL;
     };




reply via email to

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