Typedefs | |
typedef ix_fd_s | ix_fd_t |
the ix filedescriptor handle | |
typedef int(*) | IX_FD_FCT (void *userdata, ix_fd_type_e type) |
Prototype of Callback (AST) for filedescriptor activity. | |
Enumerations | |
enum | ix_fd_type_e { IX_FD_U = 0x00, IX_FD_R = 0x01, IX_FD_W = 0x02, IX_FD_E = 0x04 } |
kind of file activity More... | |
Functions | |
ix_fd_t * | ix_fd_new (ix_event_t *pev, int fd, int flag, IX_FD_FCT cb, void *userdata) |
int | ix_fd_free (ix_fd_t *pfd) |
enum ix_fd_type_e |
int ix_fd_free | ( | ix_fd_t * | pfd | ) |
frees memory for filedescriptor handle and detaches from event
pfd | ix file handle |
ix_fd_t* ix_fd_new | ( | ix_event_t * | pev, | |
int | fd, | |||
int | flag, | |||
IX_FD_FCT | cb, | |||
void * | userdata | |||
) |
constructor, relates file activity on fd to an event or callback
pev | event to trigger when activity on fd | |
fd | filedescriptor opened appropriately | |
flag | ORing of ix_fd_type_e | |
cb | when supplied, cb is called when activity on fd; if cb returns < 0 the ix_fd_t object is internally deleted do not free it externally | |
userdata | to call cb with |