mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-10-03 04:03:18 +03:00
Added ability to get connection timeout by MHD_get_connection_info().
This commit is contained in:
3 files changed
+22
-2
No files matched your search
@@ -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
|
||||
|
||||
@@ -1640,6 +1640,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
|
||||
*/
|
||||
@@ -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
|
||||
MHD_CONNECTION_INFO_CONNECTION_SUSPENDED,
|
||||
|
||||
|
||||
/**
|
||||
* Get connection timeout
|
||||
* @ingroup request
|
||||
*/
|
||||
MHD_CONNECTION_INFO_CONNECTION_TIMEOUT
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user