diff -r 2b4574e617c0 -r 4417619a9bbd src/server/daemon/sessionhandler.h --- a/src/server/daemon/sessionhandler.h Thu Aug 09 11:08:49 2012 +0200 +++ b/src/server/daemon/sessionhandler.h Sat Aug 18 11:39:34 2012 +0200 @@ -31,6 +31,7 @@ #include "../util/thrpool.h" #include "../public/nsapi.h" +#include "event.h" #ifdef __cplusplus extern "C" { @@ -54,8 +55,8 @@ /* * BasicSessionHandler * - * The BasicSessionHandler enqueues the connections to a threadpool. IO and - * request processing is handled by one thread. + * The BasicSessionHandler enqueues the connections to a threadpool. IO is + * handled by the threadpool. */ typedef struct _basic_session_handler { SessionHandler sh; @@ -63,6 +64,22 @@ } BasicSessionHandler; +/* + * EventSessionHandler + * + * The EventSessionHandler uses a event handler to handle request inputs. + */ +typedef struct _event_session_handler { + SessionHandler sh; + event_handler_t *eventhandler; +} EventSessionHandler; + +/* + * EventHttpIO + * + * defined in sesionhandler.c + */ + SessionHandler* create_basic_session_handler(); @@ -71,6 +88,12 @@ void* basic_run_session(void *data); +SessionHandler* create_event_session_handler(); + +void evt_enq_conn(SessionHandler *handler, Connection *conn); + +void evt_request_input(event_handler_t *h, event_t *event); + #ifdef __cplusplus }