extern int io_write(struct iop *, char *, int);
extern int io_gets(struct iop *, char *, int);
extern int io_puts(struct iop *, char *);
-extern int io_shutdown(struct iop *, int);
extern int io_error(struct iop *);
extern int io_eof(struct iop *);
extern void io_set_eof(struct iop *);
return ioq_puts(iop->output, buf);
}
-int
-io_shutdown(struct iop *iop, int flags)
-{
- flags &= (IO_READ | IO_WRITE);
- if ((iop->flags & flags) != flags)
- return -1;
- if (flags & IO_READ) {
- shutdown(iop->fd, 0);
- ioq_drain(iop->input);
- }
- if (flags & IO_WRITE) {
- shutdown(iop->fd, 1);
- ioq_drain(iop->output);
- iop->last_out = 0;
- }
- return 0;
-}
-
int
io_error(struct iop *iop)
{