|
|
@ -75,8 +75,6 @@ struct event_base; |
|
|
|
#define EVLIST_INTERNAL 0x10 |
|
|
|
#define EVLIST_INIT 0x80 |
|
|
|
|
|
|
|
typedef void (*event_callback_fn)(int, short, void *); |
|
|
|
|
|
|
|
struct event |
|
|
|
{ |
|
|
|
/* libev watchers we map onto */ |
|
|
@ -88,7 +86,7 @@ struct event |
|
|
|
|
|
|
|
/* compatibility slots */ |
|
|
|
struct event_base *ev_base; |
|
|
|
event_callback_fn ev_callback; |
|
|
|
void (*ev_callback)(int, short, void *arg); |
|
|
|
void *ev_arg; |
|
|
|
int ev_fd; |
|
|
|
int ev_pri; |
|
|
@ -97,8 +95,6 @@ struct event |
|
|
|
short ev_events; |
|
|
|
}; |
|
|
|
|
|
|
|
event_callback_fn event_get_callback (const struct event *ev); |
|
|
|
|
|
|
|
#define EV_READ EV_READ |
|
|
|
#define EV_WRITE EV_WRITE |
|
|
|
#define EV_PERSIST 0x10 |
|
|
@ -145,6 +141,9 @@ int event_dispatch (void); |
|
|
|
typedef void (*event_log_cb)(int severity, const char *msg); |
|
|
|
void event_set_log_callback(event_log_cb cb); |
|
|
|
|
|
|
|
typedef void (*event_callback_fn)(int, short, void *); |
|
|
|
event_callback_fn event_get_callback (const struct event *ev); |
|
|
|
|
|
|
|
void event_set (struct event *ev, int fd, short events, void (*cb)(int, short, void *), void *arg); |
|
|
|
int event_once (int fd, short events, void (*cb)(int, short, void *), void *arg, struct timeval *tv); |
|
|
|
|
|
|
|