diff options
Diffstat (limited to 'src/app.h')
-rw-r--r-- | src/app.h | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -23,30 +23,34 @@ #ifndef FCGY_APP_H #define FCGY_APP_H + typedef enum { - FCGY_INPUT_STDIO, - FCGY_INPUT_UNIX, - FCGY_INPUT_TCP -} fcgy_input_type; + FCGY_FRONT_STDIO, + FCGY_FRONT_UNIX, + FCGY_FRONT_TCP +} fcgy_front_type; typedef struct { - fcgy_input_type type; - char *addr; + fcgy_front_type type; uint16_t port; int fd; -} fcgy_input; + char *addr; + ev_io listener[1]; +} fcgy_front; typedef struct { - vec_t(fcgy_input) inputs; + vec_t(fcgy_front) fronts; /* Frontend configuration (and listen sockets) */ + vec_t(int) fconn; /* Frontend connections */ /* TODO: uid / gid */ /* TODO: backends & options */ } fcgy_app; fcgy_app *app_create(); -void app_add_input_unix(fcgy_app *, const char *); +int app_config(fcgy_app *, fcgy_config_name, const char *, char *, size_t); int app_bind(fcgy_app *); +void app_run(fcgy_app *); void app_destroy(fcgy_app *); #endif |