2 * Copyright (C) 1994, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.4 1995-03-27 08:34:23 quinn
8 * Added dynamic server functionality.
9 * Released bindings to session.c (is now redundant)
11 * Revision 1.3 1995/03/15 08:37:42 quinn
12 * Now we're pretty much set for nonblocking I/O.
14 * Revision 1.2 1995/03/14 10:28:00 quinn
15 * More work on demo server.
17 * Revision 1.1 1995/03/10 18:22:45 quinn
18 * The rudiments of an asynchronous server.
27 typedef void (*IOC_CALLBACK)(struct iochan *i, int event);
33 #define EVENT_INPUT 0x01
34 #define EVENT_OUTPUT 0x02
35 #define EVENT_EXCEPT 0x04
36 #define EVENT_TIMEOUT 0x08
45 #define iochan_destroy(i) (void)((i)->destroyed = 1)
46 #define iochan_getfd(i)
47 #define iochan_getdata(i) ((i)->data)
48 #define iochan_setdata(i, d) ((i)->data = d)
49 #define iochan_getflags(i) ((i)->flags)
50 #define iochan_setflags(i, d) ((i)->flags = d)
51 #define iochan_setflag(i, d) ((i)->flags |= d)
52 #define iochan_getflag(i, d) ((i)->flags & d ? 1 : 0)
53 #define iochan_getfun(i) ((i)->fun)
54 #define iochan_setfun(i, d) ((i)->fun = d)
55 #define iochan_setevent(i, e) ((i)->force_event = (e))
56 #define iochan_getnext(i) ((i)->next)
58 IOCHAN iochan_getchan(void);
59 IOCHAN iochan_create(int fd, IOC_CALLBACK cb, int flags);