tinywebd

diff libtinyweb/src/tinyweb.h @ 11:b13fda5c01bc

comments in tinyweb.h and README file
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 18 Apr 2015 23:55:34 +0300
parents 0dd50a23f3dd
children 86f703031228
line diff
     1.1 --- a/libtinyweb/src/tinyweb.h	Sat Apr 18 22:47:57 2015 +0300
     1.2 +++ b/libtinyweb/src/tinyweb.h	Sat Apr 18 23:55:34 2015 +0300
     1.3 @@ -8,8 +8,24 @@
     1.4  int tw_start(void);
     1.5  int tw_stop(void);
     1.6  
     1.7 +/* tw_get_sockets returns the number of active sockets managed by tinyweb
     1.8 + * (clients plus the listening socket), and fills in the array sockets
     1.9 + * passed through the socks pointer, if it's not null.
    1.10 + *
    1.11 + * Call it with a null pointer initially to get the number of sockets, then
    1.12 + * make sure you have enough space in the array and pass it in a second call
    1.13 + * to fill it.
    1.14 + */
    1.15  int tw_get_sockets(int *socks);
    1.16 +
    1.17 +/* returns the maximum file descriptor number in the set of sockets managed
    1.18 + * by the library (useful for calling select).
    1.19 + */
    1.20  int tw_get_maxfd(void);
    1.21 +
    1.22 +/* call tw_handle_socket to let tinyweb handle incoming traffic to any of the
    1.23 + * tinyweb managed sockets.
    1.24 + */
    1.25  int tw_handle_socket(int s);
    1.26  
    1.27