libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit d14fc3b3d7e4b3a55e85bab2bd2d9895d0543933
parent dc9a8c4180ff361d963fe9bd70ca4ee0e84fcf12
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Wed, 27 Apr 2022 22:24:23 +0300

MHD_get_timeout*(): improved doxy

Diffstat:
Msrc/include/microhttpd.h | 23+++++++++++++----------
Msrc/microhttpd/daemon.c | 35+++++++++++++++++++++--------------
2 files changed, 34 insertions(+), 24 deletions(-)

diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h @@ -2902,10 +2902,11 @@ MHD_get_fdset2 (struct MHD_Daemon *daemon, * return #MHD_YES will break MHD processing logic and result in "hung" * connections with data pending in network buffers and other problems. * - * It is important to always use this function when "external" polling is - * used. If this function returns #MHD_YES then #MHD_run() (or - * #MHD_run_from_select()) must be called right after return from polling - * function, regardless of the states of MHD fds. + * It is important to always use this function (or #MHD_get_timeout64(), + * #MHD_get_timeout64s() functions) when "external" polling is used. + * If this function returns #MHD_YES then #MHD_run() (or #MHD_run_from_select()) + * must be called right after return from polling function, regardless of + * the states of MHD FDs. * * In practice, if #MHD_YES is returned then #MHD_run() (or * #MHD_run_from_select()) must be called not later than @a timeout @@ -2937,10 +2938,11 @@ MHD_get_timeout (struct MHD_Daemon *daemon, * return #MHD_YES will break MHD processing logic and result in "hung" * connections with data pending in network buffers and other problems. * - * It is important to always use this function when "external" polling is - * used. If this function returns #MHD_YES then #MHD_run() (or - * #MHD_run_from_select()) must be called right after return from polling - * function, regardless of the states of MHD fds. + * It is important to always use this function (or #MHD_get_timeout(), + * #MHD_get_timeout64s() functions) when "external" polling is used. + * If this function returns #MHD_YES then #MHD_run() (or #MHD_run_from_select()) + * must be called right after return from polling function, regardless of + * the states of MHD FDs. * * In practice, if #MHD_YES is returned then #MHD_run() (or * #MHD_run_from_select()) must be called not later than @a timeout @@ -2975,8 +2977,9 @@ MHD_get_timeout64 (struct MHD_Daemon *daemon, * processing logic and result in "hung" connections with data pending in * network buffers and other problems. * - * It is important to always use this function when "external" polling is - * used. If this function returns non-negative value then #MHD_run() (or + * It is important to always use this function (or #MHD_get_timeout(), + * #MHD_get_timeout64() functions) when "external" polling is used. + * If this function returns non-negative value then #MHD_run() (or * #MHD_run_from_select()) must be called right after return from polling * function, regardless of the states of MHD FDs. * diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -3895,15 +3895,16 @@ MHD_cleanup_connections (struct MHD_Daemon *daemon) * return #MHD_YES will break MHD processing logic and result in "hung" * connections with data pending in network buffers and other problems. * - * It is important to always use this function when "external" polling is - * used. If this function returns #MHD_YES then #MHD_run() (or - * #MHD_run_from_select()) must be called right after return from polling - * function, regardless of the states of MHD fds. + * It is important to always use this function (or #MHD_get_timeout64(), + * #MHD_get_timeout64s() functions) when "external" polling is used. + * If this function returns #MHD_YES then #MHD_run() (or #MHD_run_from_select()) + * must be called right after return from polling function, regardless of + * the states of MHD FDs. * * In practice, if #MHD_YES is returned then #MHD_run() (or * #MHD_run_from_select()) must be called not later than @a timeout - * millisecond even if not activity is detected on sockets by - * sockets polling function. + * millisecond even if no activity is detected on sockets by sockets + * polling function. * @remark To be called only from thread that process * daemon's select()/poll()/etc. * @@ -3945,15 +3946,18 @@ MHD_get_timeout (struct MHD_Daemon *daemon, * return #MHD_YES will break MHD processing logic and result in "hung" * connections with data pending in network buffers and other problems. * - * It is important to always use this function when "external" polling is - * used. If this function returns #MHD_YES then #MHD_run() (or - * #MHD_run_from_select()) must be called right after return from polling - * function, regardless of the states of MHD fds. + * It is important to always use this function (or #MHD_get_timeout(), + * #MHD_get_timeout64s() functions) when "external" polling is used. + * If this function returns #MHD_YES then #MHD_run() (or #MHD_run_from_select()) + * must be called right after return from polling function, regardless of + * the states of MHD FDs. * * In practice, if #MHD_YES is returned then #MHD_run() (or * #MHD_run_from_select()) must be called not later than @a timeout - * millisecond even if not activity is detected on sockets by - * sockets polling function. + * millisecond even if no activity is detected on sockets by sockets + * polling function. + * @remark To be called only from thread that process + * daemon's select()/poll()/etc. * * @param daemon daemon to query for timeout * @param timeout64 the pointer to the variable to be set to the @@ -4053,8 +4057,9 @@ MHD_get_timeout64 (struct MHD_Daemon *daemon, * processing logic and result in "hung" connections with data pending in * network buffers and other problems. * - * It is important to always use this function when "external" polling is - * used. If this function returns non-negative value then #MHD_run() (or + * It is important to always use this function (or #MHD_get_timeout(), + * #MHD_get_timeout64() functions) when "external" polling is used. + * If this function returns non-negative value then #MHD_run() (or * #MHD_run_from_select()) must be called right after return from polling * function, regardless of the states of MHD FDs. * @@ -4062,6 +4067,8 @@ MHD_get_timeout64 (struct MHD_Daemon *daemon, * #MHD_run_from_select()) must be called not later than returned amount of * millisecond even if no activity is detected on sockets by sockets * polling function. + * @remark To be called only from thread that process + * daemon's select()/poll()/etc. * * @param daemon the daemon to query for timeout * @return -1 if connections' timeouts are not set and no data processing