gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] branch master updated: Added ability to get


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated: Added ability to get connection timeout by MHD_get_connection_info().
Date: Wed, 15 Mar 2017 19:19:42 +0100

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new b8a3977d Added ability to get connection timeout by 
MHD_get_connection_info().
b8a3977d is described below

commit b8a3977d58c58ae42762aabefff8841eabeb49c1
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Wed Mar 15 21:05:15 2017 +0300

    Added ability to get connection timeout by MHD_get_connection_info().
---
 ChangeLog                   |  4 ++++
 src/include/microhttpd.h    | 18 ++++++++++++++++--
 src/microhttpd/connection.c |  2 ++
 3 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6ea958f8..11cc8221 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Mar 15 21:02:26 MSK 2017
+       Added new enum value MHD_CONNECTION_INFO_CONNECTION_TIMEOUT
+       to get connection timeout by MHD_get_connection_info(). -EG
+
 Sat Mar 11 12:03:45 CET 2017
        Fix largepost example from tutorial to properly generate
        error pages. -CG
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index c1461988..d7fc448a 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -1641,6 +1641,13 @@ union MHD_ConnectionInfo
   int /* MHD_YES or MHD_NO */ suspended;
 
   /**
+   * Amount of second that connection could spend in idle state
+   * before automatically disconnected.
+   * Zero for no timeout (unlimited idle time).
+   */
+  unsigned int connection_timeout;
+
+  /**
    * Connect socket
    */
   MHD_socket connect_fd;
@@ -1742,10 +1749,17 @@ enum MHD_ConnectionInfoType
   MHD_CONNECTION_INFO_SOCKET_CONTEXT,
 
   /**
-   * Check wheter the connection is suspended.
+   * Check whether the connection is suspended.
+   * @ingroup request
+   */
+  MHD_CONNECTION_INFO_CONNECTION_SUSPENDED,
+
+
+  /**
+   * Get connection timeout
    * @ingroup request
    */
-  MHD_CONNECTION_INFO_CONNECTION_SUSPENDED
+  MHD_CONNECTION_INFO_CONNECTION_TIMEOUT
 };
 
 
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 7380c662..0d55fb3c 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -3331,6 +3331,8 @@ MHD_get_connection_info (struct MHD_Connection 
*connection,
       return (const union MHD_ConnectionInfo *) &connection->socket_context;
     case MHD_CONNECTION_INFO_CONNECTION_SUSPENDED:
       return (const union MHD_ConnectionInfo *) &connection->suspended;
+    case MHD_CONNECTION_INFO_CONNECTION_TIMEOUT:
+      return (const union MHD_ConnectionInfo *) 
&connection->connection_timeout;
     default:
       return NULL;
     };

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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