diff options
Diffstat (limited to 'evloop.h')
-rw-r--r-- | evloop.h | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/evloop.h b/evloop.h deleted file mode 100644 index f0d4f72..0000000 --- a/evloop.h +++ /dev/null @@ -1,32 +0,0 @@ -#include "tsocket.h" - -#ifndef __EVLOOP_H -#define __EVLOOP_H - -#define EVENT_LOOP_MAX_EVENTS 1024 - -struct evloop; -typedef struct evloop evloop_t; - -typedef void (*evloop_process_func_t)(void *data); -typedef void (*evloop_destroy_func_t)(void *data); - -struct event { - int fd; - void *data; - evloop_destroy_func_t destroy; - evloop_process_func_t process; -}; -typedef struct event event_t; - -evloop_t *evloop_create(); -int evloop_wait(evloop_t *el, int timeout); -int evloop_add(evloop_t *el, event_t *ev, int flag); -int evloop_remove(evloop_t *el, event_t *ev); -event_t *evloop_get(evloop_t *el, int index); -void evloop_loop(evloop_t *el); -event_t *event_create(void *data, int fd, - evloop_process_func_t process, - evloop_destroy_func_t destroy); - -#endif |