diff options
Diffstat (limited to 'src/include/microhttpd.h')
-rw-r--r-- | src/include/microhttpd.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h index 3d406c2e..4da26191 100644 --- a/src/include/microhttpd.h +++ b/src/include/microhttpd.h | |||
@@ -1182,6 +1182,14 @@ int MHD_get_timeout (struct MHD_Daemon *daemon, | |||
1182 | * by clients in combination with MHD_get_fdset | 1182 | * by clients in combination with MHD_get_fdset |
1183 | * if the client-controlled select method is used. | 1183 | * if the client-controlled select method is used. |
1184 | * | 1184 | * |
1185 | * This function is a convenience method, which is useful if the | ||
1186 | * fd_sets from "MHD_get_fdset" were not directly passed to 'select'; | ||
1187 | * with this function, MHD will internally do the appropriate 'select' | ||
1188 | * call itself again. While it is always safe to call 'MHD_run' (in | ||
1189 | * external select mode), you should call 'MHD_run_from_select' if | ||
1190 | * performance is important (as it saves an expensive call to | ||
1191 | * 'select'). | ||
1192 | * | ||
1185 | * @param daemon daemon to run | 1193 | * @param daemon daemon to run |
1186 | * @return MHD_YES on success, MHD_NO if this | 1194 | * @return MHD_YES on success, MHD_NO if this |
1187 | * daemon was not started with the right | 1195 | * daemon was not started with the right |
@@ -1191,6 +1199,31 @@ int | |||
1191 | MHD_run (struct MHD_Daemon *daemon); | 1199 | MHD_run (struct MHD_Daemon *daemon); |
1192 | 1200 | ||
1193 | 1201 | ||
1202 | /** | ||
1203 | * Run webserver operations. This method should be called by clients | ||
1204 | * in combination with MHD_get_fdset if the client-controlled select | ||
1205 | * method is used. | ||
1206 | * | ||
1207 | * You can use this function instead of "MHD_run" if you called | ||
1208 | * 'select' on the result from "MHD_get_fdset". File descriptors in | ||
1209 | * the sets that are not controlled by MHD will be ignored. Calling | ||
1210 | * this function instead of "MHD_run" is more efficient as MHD will | ||
1211 | * not have to call 'select' again to determine which operations are | ||
1212 | * ready. | ||
1213 | * | ||
1214 | * @param daemon daemon to run select loop for | ||
1215 | * @param read_fd_set read set | ||
1216 | * @param write_fd_set write set | ||
1217 | * @param except_fd_set except set (not used, can be NULL) | ||
1218 | * @return MHD_NO on serious errors, MHD_YES on success | ||
1219 | */ | ||
1220 | int | ||
1221 | MHD_run_from_select (struct MHD_Daemon *daemon, | ||
1222 | const fd_set *read_fd_set, | ||
1223 | const fd_set *write_fd_set, | ||
1224 | const fd_set *except_fd_set); | ||
1225 | |||
1226 | |||
1194 | /* **************** Connection handling functions ***************** */ | 1227 | /* **************** Connection handling functions ***************** */ |
1195 | 1228 | ||
1196 | /** | 1229 | /** |