aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-10-31 18:21:33 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-10-31 18:21:33 +0300
commit079dfd2cb8760d21e2f04a869e9a41b1dede28c8 (patch)
tree3cdd4f252bf804f1fbe61b443f5c861a31d20e6c
parentd5993f6c1f323d0de2577a82143cdc9f6c3facc1 (diff)
downloadlibmicrohttpd-079dfd2cb8760d21e2f04a869e9a41b1dede28c8.tar.gz
libmicrohttpd-079dfd2cb8760d21e2f04a869e9a41b1dede28c8.zip
MHD_get_timeout(): improved doxy
-rw-r--r--src/include/microhttpd.h5
-rw-r--r--src/microhttpd/daemon.c20
2 files changed, 13 insertions, 12 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 2b7b68e6..7bb09ead 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -2851,12 +2851,13 @@ MHD_get_fdset2 (struct MHD_Daemon *daemon,
2851 * 2851 *
2852 * In practice, if #MHD_YES is returned then #MHD_run() (or 2852 * In practice, if #MHD_YES is returned then #MHD_run() (or
2853 * #MHD_run_from_select()) must be called not later than @a timeout 2853 * #MHD_run_from_select()) must be called not later than @a timeout
2854 * millisecond. 2854 * millisecond even if not activity is detected on sockets by
2855 * sockets polling function.
2855 * 2856 *
2856 * @param daemon daemon to query for timeout 2857 * @param daemon daemon to query for timeout
2857 * @param timeout set to the timeout (in milliseconds) 2858 * @param timeout set to the timeout (in milliseconds)
2858 * @return #MHD_YES on success, #MHD_NO if timeouts are 2859 * @return #MHD_YES on success, #MHD_NO if timeouts are
2859 * not used and no data is pending. 2860 * not used and no data processing is pending.
2860 * @ingroup event 2861 * @ingroup event
2861 */ 2862 */
2862_MHD_EXTERN enum MHD_Result 2863_MHD_EXTERN enum MHD_Result
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 8fae1c64..755fee08 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -3818,29 +3818,29 @@ MHD_cleanup_connections (struct MHD_Daemon *daemon)
3818 * function (`select()`, `poll()` or epoll) should at most block, not the 3818 * function (`select()`, `poll()` or epoll) should at most block, not the
3819 * timeout value set for connections. 3819 * timeout value set for connections.
3820 * 3820 *
3821 * Any external polling function must be called with the timeout value 3821 * Any "external" sockets polling function must be called with the timeout
3822 * provided by this function. Smaller timeout values can be used for polling 3822 * value provided by this function. Smaller timeout values can be used for
3823 * function if it is required for any reason, but using larger timeout value 3823 * polling function if it is required for any reason, but using larger
3824 * or no timeout (indefinite timeout) when this function return #MHD_YES 3824 * timeout value or no timeout (indefinite timeout) when this function
3825 * will break MHD processing logic and result in "hung" connections with 3825 * return #MHD_YES will break MHD processing logic and result in "hung"
3826 * data pending in network buffers and other problems. 3826 * connections with data pending in network buffers and other problems.
3827 * 3827 *
3828 * It is important to always use this function when external polling is 3828 * It is important to always use this function when "external" polling is
3829 * used. If this function returns #MHD_YES then #MHD_run() (or 3829 * used. If this function returns #MHD_YES then #MHD_run() (or
3830 * #MHD_run_from_select()) must be called right after return from polling 3830 * #MHD_run_from_select()) must be called right after return from polling
3831 * function, regardless of the states of MHD fds. 3831 * function, regardless of the states of MHD fds.
3832 * 3832 *
3833 * In practice, if #MHD_YES is returned then #MHD_run() (or 3833 * In practice, if #MHD_YES is returned then #MHD_run() (or
3834 * #MHD_run_from_select()) must be called not later than @a timeout 3834 * #MHD_run_from_select()) must be called not later than @a timeout
3835 * millisecond. 3835 * millisecond even if not activity is detected on sockets by
3836 * sockets polling function.
3836 * @remark To be called only from thread that process 3837 * @remark To be called only from thread that process
3837 * daemon's select()/poll()/etc. 3838 * daemon's select()/poll()/etc.
3838 * 3839 *
3839 * @param daemon daemon to query for timeout 3840 * @param daemon daemon to query for timeout
3840 * @param timeout set to the timeout (in milliseconds) 3841 * @param timeout set to the timeout (in milliseconds)
3841 * @return #MHD_YES on success, #MHD_NO if timeouts are 3842 * @return #MHD_YES on success, #MHD_NO if timeouts are
3842 * not used (or no connections exist that would 3843 * not used and no data processing is pending.
3843 * necessitate the use of a timeout right now).
3844 * @ingroup event 3844 * @ingroup event
3845 */ 3845 */
3846enum MHD_Result 3846enum MHD_Result