aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-09-04 15:51:15 +0000
committerChristian Grothoff <christian@grothoff.org>2016-09-04 15:51:15 +0000
commit58b3056ca8cecf0a7f3038d1db0333bee5cb7005 (patch)
tree9a2679ed57df1ab11f72dbbf30c2d11b02d8cd62
parent57ab27681ef657ab91916c43c3e52b9cb1c07c0a (diff)
downloadlibmicrohttpd-58b3056ca8cecf0a7f3038d1db0333bee5cb7005.tar.gz
libmicrohttpd-58b3056ca8cecf0a7f3038d1db0333bee5cb7005.zip
-document better how to use MHD_resume_connection() with external event loop
-rw-r--r--doc/libmicrohttpd.texi6
-rw-r--r--src/include/microhttpd.h6
2 files changed, 12 insertions, 0 deletions
diff --git a/doc/libmicrohttpd.texi b/doc/libmicrohttpd.texi
index 74a285c7..f3a96608 100644
--- a/doc/libmicrohttpd.texi
+++ b/doc/libmicrohttpd.texi
@@ -2238,6 +2238,12 @@ to resume a suspended connection at any time. Calling this function
2238on a connection that was not previously suspended will result in 2238on a connection that was not previously suspended will result in
2239undefined behavior. 2239undefined behavior.
2240 2240
2241If you are using this function in ``external'' select mode, you must
2242make sure to run @code{MHD_run} afterwards (before again calling
2243@code{MHD_get_fdset}), as otherwise the change may not be reflected in
2244the set returned by @code{MHD_get_fdset} and you may end up with a
2245connection that is stuck until the next network activity.
2246
2241You can check whether a connection is currently suspended using 2247You can check whether a connection is currently suspended using
2242@code{MHD_get_connection_info} by querying for 2248@code{MHD_get_connection_info} by querying for
2243@code{MHD_CONNECTION_INFO_CONNECTION_SUSPENDED}. 2249@code{MHD_CONNECTION_INFO_CONNECTION_SUSPENDED}.
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 1b2f92c6..5bc7eb15 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -1998,6 +1998,12 @@ MHD_suspend_connection (struct MHD_Connection *connection);
1998 * function on a connection that was not previously suspended will 1998 * function on a connection that was not previously suspended will
1999 * result in undefined behavior. 1999 * result in undefined behavior.
2000 * 2000 *
2001 * If you are using this function in ``external'' select mode, you must
2002 * make sure to run #MHD_run() afterwards (before again calling
2003 * #MHD_get_fdset(), as otherwise the change may not be reflected in
2004 * the set returned by #MHD_get_fdset() and you may end up with a
2005 * connection that is stuck until the next network activity.
2006 *
2001 * @param connection the connection to resume 2007 * @param connection the connection to resume
2002 */ 2008 */
2003_MHD_EXTERN void 2009_MHD_EXTERN void