49 #define EVENT_INPUT 0x01
50 #define EVENT_OUTPUT 0x02
51 #define EVENT_EXCEPT 0x04
52 #define EVENT_TIMEOUT 0x08
64 #define iochan_destroy(i) (void)((i)->destroyed = 1)
65 #define iochan_getfd(i) ((i)->fd)
66 #define iochan_setfd(i, f) ((i)->fd = (f))
67 #define iochan_getdata(i) ((i)->data)
68 #define iochan_setdata(i, d) ((i)->data = d)
69 #define iochan_getflags(i) ((i)->flags)
70 #define iochan_setflags(i, d) ((i)->flags = d)
71 #define iochan_setflag(i, d) ((i)->flags |= d)
72 #define iochan_clearflag(i, d) ((i)->flags &= ~(d))
73 #define iochan_getflag(i, d) ((i)->flags & d ? 1 : 0)
74 #define iochan_getfun(i) ((i)->fun)
75 #define iochan_setfun(i, d) ((i)->fun = d)
76 #define iochan_setevent(i, e) ((i)->force_event = (e))
77 #define iochan_getnext(i) ((i)->next)
78 #define iochan_settimeout(i, t) ((i)->max_idle = (t), (i)->last_event = time(0))
int iochan_event_loop(IOCHAN *iochans, int *watch_sig)
IOCHAN iochan_create(int fd, IOC_CALLBACK cb, int flags, int port)
int iochan_is_alive(IOCHAN chan)
void statserv_remove(IOCHAN pIOChannel)
void(* IOC_CALLBACK)(struct iochan *i, int event)