struct timeval;
-#define fd_wants_reads(FD) ((FD)->wants_reads || (FD)->state == IO_LISTENING)
#define fd_wants_writes(FD) (((FD)->send.get != (FD)->send.put) || (FD)->state == IO_CONNECTING)
struct io_engine {
const char *name;
int (*init)(void);
void (*add)(struct io_fd *fd);
- void (*remove)(struct io_fd *fd);
+ void (*remove)(struct io_fd *fd, int os_closed);
void (*update)(struct io_fd *fd);
int (*loop)(struct timeval *timeout);
void (*cleanup)(void);