aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-03-31 18:28:43 +0000
committerChristian Grothoff <christian@grothoff.org>2013-03-31 18:28:43 +0000
commit39affe6c5629b78e418f33787ec7a9556b287832 (patch)
treec7951f6ec566334705e1a78ef0ba9bdba368ce8c /doc
parent5b45f52e777fafb65fe9e4a53d202e38e3accdc9 (diff)
downloadlibmicrohttpd-39affe6c5629b78e418f33787ec7a9556b287832.tar.gz
libmicrohttpd-39affe6c5629b78e418f33787ec7a9556b287832.zip
adding MHD_run_from_select to API
Diffstat (limited to 'doc')
-rw-r--r--doc/libmicrohttpd.texi42
1 files changed, 42 insertions, 0 deletions
diff --git a/doc/libmicrohttpd.texi b/doc/libmicrohttpd.texi
index b5284c3c..d82ebeb3 100644
--- a/doc/libmicrohttpd.texi
+++ b/doc/libmicrohttpd.texi
@@ -1095,11 +1095,53 @@ Shutdown an HTTP daemon.
1095Run webserver operations (without blocking unless in client callbacks). 1095Run webserver operations (without blocking unless in client callbacks).
1096This method should be called by clients in combination with 1096This method should be called by clients in combination with
1097@code{MHD_get_fdset()} if the client-controlled @code{select}-method is used. 1097@code{MHD_get_fdset()} if the client-controlled @code{select}-method is used.
1098@cindex select
1099@cindex poll
1100
1101This function will work for external @code{poll} and @code{select} mode.
1102However, if using external @code{select} mode, you may want to
1103instead use @code{MHD_run_from_select}, as it is more efficient.
1104
1105@table @var
1106@item daemon
1107daemon to process connections of
1108@end table
1098 1109
1099Return @code{MHD_YES} on success, @code{MHD_NO} if this daemon was not 1110Return @code{MHD_YES} on success, @code{MHD_NO} if this daemon was not
1100started with the right options for this call. 1111started with the right options for this call.
1101@end deftypefun 1112@end deftypefun
1102 1113
1114@deftypefun int MHD_run_from_select (struct MHD_Daemon *daemon, const fd_set *read_fd_set, const fd_set *write_fd_set, const fd_set *except_fd_set)
1115Run webserver operations given sets of ready socket handles.
1116@cindex select
1117
1118This method should be called by clients in combination with
1119@code{MHD_get_fdset} if the client-controlled (external)
1120select method is used.
1121
1122You can use this function instead of @code{MHD_run} if you called
1123@code{select} on the result from @code{MHD_get_fdset}. File descriptors in
1124the sets that are not controlled by MHD will be ignored. Calling
1125this function instead of @code{MHD_run} is more efficient as MHD will
1126not have to call @code{select} again to determine which operations are
1127ready.
1128
1129@table @var
1130@item daemon
1131daemon to process connections of
1132@item read_fd_set
1133set of descriptors that must be ready for reading without blocking
1134@item write_fd_set
1135set of descriptors that must be ready for writing without blocking
1136@item except_fd_set
1137ignored, can be NULL
1138@end table
1139
1140Return @code{MHD_YES} on success, @code{MHD_NO} on serious internal
1141errors.
1142
1143@end deftypefun
1144
1103 1145
1104@deftypefun void MHD_add_connection (struct MHD_Daemon *daemon, int client_socket, const struct sockaddr *addr, socklen_t addrlen) 1146@deftypefun void MHD_add_connection (struct MHD_Daemon *daemon, int client_socket, const struct sockaddr *addr, socklen_t addrlen)
1105Add another client connection to the set of connections 1147Add another client connection to the set of connections