diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-09-25 19:45:44 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-09-25 19:45:44 +0300 |
commit | 71e09c24e64ce9063f1f0dacfaa76363f48a8793 (patch) | |
tree | daf48a0e4116e922c72eeee7e790decc339d2d16 /src | |
parent | cba8e9f23e0855c63626118536a1495bd8c45089 (diff) | |
download | libmicrohttpd-71e09c24e64ce9063f1f0dacfaa76363f48a8793.tar.gz libmicrohttpd-71e09c24e64ce9063f1f0dacfaa76363f48a8793.zip |
Clarified doxy description of MHD_run_wait()
Diffstat (limited to 'src')
-rw-r--r-- | src/include/microhttpd.h | 26 | ||||
-rw-r--r-- | src/microhttpd/daemon.c | 26 |
2 files changed, 30 insertions, 22 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h index b57019d1..74f539ad 100644 --- a/src/include/microhttpd.h +++ b/src/include/microhttpd.h | |||
@@ -2777,30 +2777,34 @@ MHD_run (struct MHD_Daemon *daemon); | |||
2777 | /** | 2777 | /** |
2778 | * Run websever operation with possible blocking. | 2778 | * Run websever operation with possible blocking. |
2779 | * | 2779 | * |
2780 | * This function does the following: waits for any network event not more | 2780 | * This function does the following: waits for any network event not more than |
2781 | * than specified number of milliseconds, processes all incoming and | 2781 | * specified number of milliseconds, processes all incoming and outgoing data, |
2782 | * outgoing data, processes new connections, processes any timed-out | 2782 | * processes new connections, processes any timed-out connection, and does |
2783 | * connection, and does other things required to run webserver. | 2783 | * other things required to run webserver. |
2784 | * Once all connections are processed, function returns. | 2784 | * Once all connections are processed, function returns. |
2785 | * | 2785 | * |
2786 | * This function is useful for quick and simple webserver implementation if | 2786 | * This function is useful for quick and simple (lazy) webserver implementation |
2787 | * application needs to run a single thread only and does not have any other | 2787 | * if application needs to run a single thread only and does not have any other |
2788 | * network activity. | 2788 | * network activity. |
2789 | * | 2789 | * |
2790 | * This function calls MHD_get_timeout() internally and use returned value as | ||
2791 | * maximum wait time if it less than value of @a millisec parameter. | ||
2792 | * | ||
2790 | * It is expected that the external socket polling function is not used in | 2793 | * It is expected that the external socket polling function is not used in |
2791 | * conjunction with this function unless the @a millisec is set to zero. | 2794 | * conjunction with this function unless the @a millisec is set to zero. |
2792 | * | 2795 | * |
2793 | * @param daemon the daemon to run | 2796 | * @param daemon the daemon to run |
2794 | * @param millisec the maximum time in milliseconds to wait for network and | 2797 | * @param millisec the maximum time in milliseconds to wait for network and |
2795 | * other events. Note: there is no guarantee that function | 2798 | * other events. Note: there is no guarantee that function |
2796 | * blocks for specified amount of time. The real processing | 2799 | * blocks for the specified amount of time. The real processing |
2797 | * time can be shorter (if some data comes earlier) or | 2800 | * time can be shorter (if some data or connection timeout |
2798 | * longer (if data processing requires more time, especially | 2801 | * comes earlier) or longer (if data processing requires more |
2799 | * in the user callbacks). | 2802 | * time, especially in user callbacks). |
2800 | * If set to '0' then function does not block and processes | 2803 | * If set to '0' then function does not block and processes |
2801 | * only already available data (if any). | 2804 | * only already available data (if any). |
2802 | * If set to '-1' then function waits for events | 2805 | * If set to '-1' then function waits for events |
2803 | * indefinitely (blocks until next network activity). | 2806 | * indefinitely (blocks until next network activity or |
2807 | * connection timeout). | ||
2804 | * @return #MHD_YES on success, #MHD_NO if this | 2808 | * @return #MHD_YES on success, #MHD_NO if this |
2805 | * daemon was not started with the right | 2809 | * daemon was not started with the right |
2806 | * options for this call or some serious | 2810 | * options for this call or some serious |
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 310a919e..f1660848 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -5190,30 +5190,34 @@ MHD_run (struct MHD_Daemon *daemon) | |||
5190 | /** | 5190 | /** |
5191 | * Run websever operation with possible blocking. | 5191 | * Run websever operation with possible blocking. |
5192 | * | 5192 | * |
5193 | * This function does the following: waits for any network event not more | 5193 | * This function does the following: waits for any network event not more than |
5194 | * than specified number of milliseconds, processes all incoming and | 5194 | * specified number of milliseconds, processes all incoming and outgoing data, |
5195 | * outgoing data, processes new connections, processes any timed-out | 5195 | * processes new connections, processes any timed-out connection, and does |
5196 | * connection, and does other things required to run webserver. | 5196 | * other things required to run webserver. |
5197 | * Once all connections are processed, function returns. | 5197 | * Once all connections are processed, function returns. |
5198 | * | 5198 | * |
5199 | * This function is useful for quick and simple webserver implementation if | 5199 | * This function is useful for quick and simple (lazy) webserver implementation |
5200 | * application needs to run a single thread only and does not have any other | 5200 | * if application needs to run a single thread only and does not have any other |
5201 | * network activity. | 5201 | * network activity. |
5202 | * | 5202 | * |
5203 | * This function calls MHD_get_timeout() internally and use returned value as | ||
5204 | * maximum wait time if it less than value of @a millisec parameter. | ||
5205 | * | ||
5203 | * It is expected that the external socket polling function is not used in | 5206 | * It is expected that the external socket polling function is not used in |
5204 | * conjunction with this function unless the @a millisec is set to zero. | 5207 | * conjunction with this function unless the @a millisec is set to zero. |
5205 | * | 5208 | * |
5206 | * @param daemon the daemon to run | 5209 | * @param daemon the daemon to run |
5207 | * @param millisec the maximum time in milliseconds to wait for network and | 5210 | * @param millisec the maximum time in milliseconds to wait for network and |
5208 | * other events. Note: there is no guarantee that function | 5211 | * other events. Note: there is no guarantee that function |
5209 | * blocks for specified amount of time. The real processing | 5212 | * blocks for the specified amount of time. The real processing |
5210 | * time can be shorter (if some data comes earlier) or | 5213 | * time can be shorter (if some data or connection timeout |
5211 | * longer (if data processing requires more time, especially | 5214 | * comes earlier) or longer (if data processing requires more |
5212 | * in the user callbacks). | 5215 | * time, especially in user callbacks). |
5213 | * If set to '0' then function does not block and processes | 5216 | * If set to '0' then function does not block and processes |
5214 | * only already available data (if any). | 5217 | * only already available data (if any). |
5215 | * If set to '-1' then function waits for events | 5218 | * If set to '-1' then function waits for events |
5216 | * indefinitely (blocks until next network activity). | 5219 | * indefinitely (blocks until next network activity or |
5220 | * connection timeout). | ||
5217 | * @return #MHD_YES on success, #MHD_NO if this | 5221 | * @return #MHD_YES on success, #MHD_NO if this |
5218 | * daemon was not started with the right | 5222 | * daemon was not started with the right |
5219 | * options for this call or some serious | 5223 | * options for this call or some serious |