Chainsaw used this together with the notify callback to make the iop
data type usable for sockets it listened on, so that io_select() could
multiplex them along with the sockets used for actual I/O.
io_select() became unused in Empire 2, and finally got removed in
commit
875d72a0, v4.2.13. That made the IO_NEWSOCK and the notify
callback defunct. The latter got removed in commit
7d5a6b81, v4.3.1.
#define IO_READ 0x1
#define IO_WRITE 0x2
-#define IO_NEWSOCK 0x4
#define IO_NBLOCK 0x8
#define IO_EOF 0x10
#define IO_ERROR 0x40
{
struct iop *iop;
- flags = flags & (IO_READ | IO_WRITE | IO_NBLOCK | IO_NEWSOCK);
+ flags = flags & (IO_READ | IO_WRITE | IO_NBLOCK);
if ((flags & (IO_READ | IO_WRITE)) == 0)
return NULL;
iop = malloc(sizeof(struct iop));
iop->flags = 0;
iop->input_timeout = timeout;
iop->bufsize = bufsize;
- if ((flags & IO_READ) && (flags & IO_NEWSOCK) == 0)
+ if (flags & IO_READ)
iop->input = ioq_create(bufsize);
- if ((flags & IO_WRITE) && (flags & IO_NEWSOCK) == 0)
+ if (flags & IO_WRITE)
iop->output = ioq_create(bufsize);
if (flags & IO_NBLOCK)
io_noblocking(iop, 1); /* FIXME check success */