IXP_LISTEN(3) | Library Functions Manual | IXP_LISTEN(3) |
ixp_listen, IxpConn
#include <ixp.h> IxpConn *ixp_listen(IxpServer *srv, int fd, void *aux, void (*read)(IxpConn *), void (*close)(IxpConn *)); typedef struct IxpConn IxpConn; struct IxpConn {
IxpServer* srv;
void* aux; /* Arbitrary pointer, to be used by handlers. */
int fd; /* The file descriptor of the connection. */
void (*read)(IxpConn *);
void (*close)(IxpConn *);
char closed; /* Non-zero when fd has been closed. */
/* Private members */
... }
Starts the server srv listening on fd. The optional read and close callbacks are called with the IxpConn structure for the connection as their sole argument.
Returns the connection's new IxpConn data structure.
2012 Dec | libixp Manual |