... | ... |
@@ -7,6 +7,7 @@ |
7 | 7 |
* |
8 | 8 |
* History: |
9 | 9 |
* 21/01/2014 Creation. |
10 |
+ * 2/04/2014 wk_fdinit()/_fdcheck(). |
|
10 | 11 |
* |
11 | 12 |
* Author: Dario Rodriguez dario@softhome.net |
12 | 13 |
* This library is licensed on the terms of the GNU LGPL v2+ |
... | ... |
@@ -14,13 +15,15 @@ |
14 | 15 |
|
15 | 16 |
#ifndef WEBKERNEL_H |
16 | 17 |
#define WEBKERNEL_H |
18 |
+#include <sys/select.h> |
|
17 | 19 |
#include "iobuf.h" |
18 | 20 |
|
19 | 21 |
typedef void wk; |
20 | 22 |
|
21 | 23 |
wk *wk_init(int port); |
22 | 24 |
void wk_free(wk *web); |
23 |
- |
|
25 |
+int wk_fdsetinit(wk *web, int *n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds); /* n, readfds, writefds and execptfds must be already initialized to 0 */ |
|
26 |
+int wk_fdsetcheck(wk *web, fd_set *readfds, fd_set *writefds, fd_set *exceptfds); |
|
24 | 27 |
int wk_select(wk *web, int timemoutms,...); |
25 | 28 |
int wk_httpaccept(wk *web, int *httpnum); |
26 | 29 |
int wk_httpisrequest(char *line); |