diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-03-15 21:05:15 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-03-15 21:05:15 +0300 |
commit | b8a3977d58c58ae42762aabefff8841eabeb49c1 (patch) | |
tree | 596e5270184db1538b0e63939bdc700099866ce8 /src/include/microhttpd.h | |
parent | 4b6e4c630dc6027ee5046d3c558864d94c6758c7 (diff) | |
download | libmicrohttpd-b8a3977d58c58ae42762aabefff8841eabeb49c1.tar.gz libmicrohttpd-b8a3977d58c58ae42762aabefff8841eabeb49c1.zip |
Added ability to get connection timeout by MHD_get_connection_info().
Diffstat (limited to 'src/include/microhttpd.h')
-rw-r--r-- | src/include/microhttpd.h | 18 |
1 files changed, 16 insertions, 2 deletions
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 | |||
1641 | int /* MHD_YES or MHD_NO */ suspended; | 1641 | int /* MHD_YES or MHD_NO */ suspended; |
1642 | 1642 | ||
1643 | /** | 1643 | /** |
1644 | * Amount of second that connection could spend in idle state | ||
1645 | * before automatically disconnected. | ||
1646 | * Zero for no timeout (unlimited idle time). | ||
1647 | */ | ||
1648 | unsigned int connection_timeout; | ||
1649 | |||
1650 | /** | ||
1644 | * Connect socket | 1651 | * Connect socket |
1645 | */ | 1652 | */ |
1646 | MHD_socket connect_fd; | 1653 | MHD_socket connect_fd; |
@@ -1742,10 +1749,17 @@ enum MHD_ConnectionInfoType | |||
1742 | MHD_CONNECTION_INFO_SOCKET_CONTEXT, | 1749 | MHD_CONNECTION_INFO_SOCKET_CONTEXT, |
1743 | 1750 | ||
1744 | /** | 1751 | /** |
1745 | * Check wheter the connection is suspended. | 1752 | * Check whether the connection is suspended. |
1753 | * @ingroup request | ||
1754 | */ | ||
1755 | MHD_CONNECTION_INFO_CONNECTION_SUSPENDED, | ||
1756 | |||
1757 | |||
1758 | /** | ||
1759 | * Get connection timeout | ||
1746 | * @ingroup request | 1760 | * @ingroup request |
1747 | */ | 1761 | */ |
1748 | MHD_CONNECTION_INFO_CONNECTION_SUSPENDED | 1762 | MHD_CONNECTION_INFO_CONNECTION_TIMEOUT |
1749 | }; | 1763 | }; |
1750 | 1764 | ||
1751 | 1765 | ||