Filedescriptor activity


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_tix_fd_new (ix_event_t *pev, int fd, int flag, IX_FD_FCT cb, void *userdata)
int ix_fd_free (ix_fd_t *pfd)

Detailed Description

Here we map file descriptor activity to ix events.

Enumeration Type Documentation

enum ix_fd_type_e

kind of file activity

Enumerator:
IX_FD_U  unset
IX_FD_R  ready to read
IX_FD_W  ready to write
IX_FD_E  error condition


Function Documentation

int ix_fd_free ( ix_fd_t pfd  ) 

frees memory for filedescriptor handle and detaches from event

Parameters:
pfd ix file handle
Returns:
  • 0: OK
  • !0: Error

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

Parameters:
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
Returns:
  • Handle: OK
  • NULL: error


Generated on 4 Mar 2014 for ixtools by  doxygen 1.4.7