libmicrohttpd

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

commit 71e09c24e64ce9063f1f0dacfaa76363f48a8793
parent cba8e9f23e0855c63626118536a1495bd8c45089
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Sat, 25 Sep 2021 19:45:44 +0300

Clarified doxy description of MHD_run_wait()

Diffstat:
Msrc/include/microhttpd.h | 26+++++++++++++++-----------
Msrc/microhttpd/daemon.c | 26+++++++++++++++-----------
2 files changed, 30 insertions(+), 22 deletions(-)

diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h @@ -2777,30 +2777,34 @@ MHD_run (struct MHD_Daemon *daemon); /** * Run websever operation with possible blocking. * - * This function does the following: waits for any network event not more - * than specified number of milliseconds, processes all incoming and - * outgoing data, processes new connections, processes any timed-out - * connection, and does other things required to run webserver. + * This function does the following: waits for any network event not more than + * specified number of milliseconds, processes all incoming and outgoing data, + * processes new connections, processes any timed-out connection, and does + * other things required to run webserver. * Once all connections are processed, function returns. * - * This function is useful for quick and simple webserver implementation if - * application needs to run a single thread only and does not have any other + * This function is useful for quick and simple (lazy) webserver implementation + * if application needs to run a single thread only and does not have any other * network activity. * + * This function calls MHD_get_timeout() internally and use returned value as + * maximum wait time if it less than value of @a millisec parameter. + * * It is expected that the external socket polling function is not used in * conjunction with this function unless the @a millisec is set to zero. * * @param daemon the daemon to run * @param millisec the maximum time in milliseconds to wait for network and * other events. Note: there is no guarantee that function - * blocks for specified amount of time. The real processing - * time can be shorter (if some data comes earlier) or - * longer (if data processing requires more time, especially - * in the user callbacks). + * blocks for the specified amount of time. The real processing + * time can be shorter (if some data or connection timeout + * comes earlier) or longer (if data processing requires more + * time, especially in user callbacks). * If set to '0' then function does not block and processes * only already available data (if any). * If set to '-1' then function waits for events - * indefinitely (blocks until next network activity). + * indefinitely (blocks until next network activity or + * connection timeout). * @return #MHD_YES on success, #MHD_NO if this * daemon was not started with the right * options for this call or some serious diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -5190,30 +5190,34 @@ MHD_run (struct MHD_Daemon *daemon) /** * Run websever operation with possible blocking. * - * This function does the following: waits for any network event not more - * than specified number of milliseconds, processes all incoming and - * outgoing data, processes new connections, processes any timed-out - * connection, and does other things required to run webserver. + * This function does the following: waits for any network event not more than + * specified number of milliseconds, processes all incoming and outgoing data, + * processes new connections, processes any timed-out connection, and does + * other things required to run webserver. * Once all connections are processed, function returns. * - * This function is useful for quick and simple webserver implementation if - * application needs to run a single thread only and does not have any other + * This function is useful for quick and simple (lazy) webserver implementation + * if application needs to run a single thread only and does not have any other * network activity. * + * This function calls MHD_get_timeout() internally and use returned value as + * maximum wait time if it less than value of @a millisec parameter. + * * It is expected that the external socket polling function is not used in * conjunction with this function unless the @a millisec is set to zero. * * @param daemon the daemon to run * @param millisec the maximum time in milliseconds to wait for network and * other events. Note: there is no guarantee that function - * blocks for specified amount of time. The real processing - * time can be shorter (if some data comes earlier) or - * longer (if data processing requires more time, especially - * in the user callbacks). + * blocks for the specified amount of time. The real processing + * time can be shorter (if some data or connection timeout + * comes earlier) or longer (if data processing requires more + * time, especially in user callbacks). * If set to '0' then function does not block and processes * only already available data (if any). * If set to '-1' then function waits for events - * indefinitely (blocks until next network activity). + * indefinitely (blocks until next network activity or + * connection timeout). * @return #MHD_YES on success, #MHD_NO if this * daemon was not started with the right * options for this call or some serious