diff options
Diffstat (limited to 'src/lib/daemon_run.c')
-rw-r--r-- | src/lib/daemon_run.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/lib/daemon_run.c b/src/lib/daemon_run.c new file mode 100644 index 00000000..cf9ab5de --- /dev/null +++ b/src/lib/daemon_run.c | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | This file is part of libmicrohttpd | ||
3 | Copyright (C) 2007-2018 Daniel Pittman and Christian Grothoff | ||
4 | |||
5 | This library is free software; you can redistribute it and/or | ||
6 | modify it under the terms of the GNU Lesser General Public | ||
7 | License as published by the Free Software Foundation; either | ||
8 | version 2.1 of the License, or (at your option) any later version. | ||
9 | |||
10 | This library is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | Lesser General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Lesser General Public | ||
16 | License along with this library; if not, write to the Free Software | ||
17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
18 | */ | ||
19 | |||
20 | /** | ||
21 | * @file lib/daemon_run.c | ||
22 | * @brief generic function to run event loop of a daemon | ||
23 | * @author Christian Grothoff | ||
24 | */ | ||
25 | #include "internal.h" | ||
26 | |||
27 | |||
28 | /** | ||
29 | * Run webserver operations (without blocking unless in client | ||
30 | * callbacks). This method should be called by clients in combination | ||
31 | * with #MHD_get_fdset if the client-controlled select method is used | ||
32 | * and #MHD_get_timeout(). | ||
33 | * | ||
34 | * This function is a convenience method, which is useful if the | ||
35 | * fd_sets from #MHD_get_fdset were not directly passed to `select()`; | ||
36 | * with this function, MHD will internally do the appropriate `select()` | ||
37 | * call itself again. While it is always safe to call #MHD_run (if | ||
38 | * #MHD_USE_INTERNAL_POLLING_THREAD is not set), you should call | ||
39 | * #MHD_run_from_select if performance is important (as it saves an | ||
40 | * expensive call to `select()`). | ||
41 | * | ||
42 | * @param daemon daemon to run | ||
43 | * @return #MHD_SC_OK on success | ||
44 | * @ingroup event | ||
45 | */ | ||
46 | enum MHD_StatusCode | ||
47 | MHD_daemon_run (struct MHD_Daemon *daemon) | ||
48 | { | ||
49 | return -1; | ||
50 | } | ||
51 | |||
52 | /* end of daemon_run.c */ | ||