35 #define EVENT_INPUT 0x01
36 #define EVENT_OUTPUT 0x02
37 #define EVENT_EXCEPT 0x04
38 #define EVENT_TIMEOUT 0x08
60 #define iochan_getfd(i) ((i)->fd)
61 #define iochan_setfd(i, d) ((i)->fd = d)
62 #define iochan_getdata(i) ((i)->data)
63 #define iochan_setdata(i, d) ((i)->data = d)
64 #define iochan_setflags(i, d) ((i)->flags = d)
65 #define iochan_setflag(i, d) ((i)->flags |= d)
66 #define iochan_clearflag(i, d) ((i)->flags &= ~(d))
67 #define iochan_getflag(i, d) ((i)->flags & d ? 1 : 0)
68 #define iochan_settimeout(i, t) ((i)->max_idle = (t), (i)->last_event = time(0))
69 #define iochan_activity(i) ((i)->last_event = time(0))
void iochan_man_events(iochan_man_t man)
void iochan_man_destroy(iochan_man_t *mp)
struct iochan_man_s * iochan_man_t
IOCHAN iochan_create(int fd, IOC_CALLBACK cb, int flags, const char *name)
iochan_man_t iochan_man_create(int no_threads, int max_sockets)
void iochan_destroy(IOCHAN chan)
void(* IOC_CALLBACK)(struct iochan *i, int event)
int iochan_add(iochan_man_t man, IOCHAN chan, int slack)