libixp

git clone git://oldgit.suckless.org/libixp/
Log | Files | Refs | LICENSE

ixp_listen.3 (1457B)


      1 .TH "IXP_LISTEN" 3 "2010 Jun" "libixp Manual"
      2 
      3 .SH NAME
      4 .P
      5 ixp_listen, IxpConn
      6 
      7 .SH SYNOPSIS
      8 .nf
      9   #include <ixp.h>
     10   
     11   IxpConn *ixp_listen(IxpServer *srv, int fd, void *aux, void (*read)(IxpConn *), void (*close)(IxpConn *));
     12   
     13   typedef struct IxpConn IxpConn;
     14   struct IxpConn {
     15           IxpServer*      srv;
     16           void*           aux;    /* Arbitrary pointer, to be used by handlers. */
     17           int             fd;     /* The file descriptor of the connection. */
     18           void            (*read)(IxpConn *);
     19           void            (*close)(IxpConn *);
     20           char            closed; /* Non-zero when IfdR has been closed. */
     21   
     22           /* Private members */
     23           ...
     24   }
     25 .fi
     26 
     27 .SH PARAMETERS
     28 .TP
     29 fs
     30 The file descriptor on which to listen.
     31 .TP
     32 aux
     33 A piece of data to store in the connection's
     34 IauxR member of the IxpConn data structure.
     35 .TP
     36 read
     37 The function called when the connection has
     38 data available to read.
     39 .TP
     40 close
     41 A cleanup function called when the
     42 connection is closed.
     43 
     44 .SH DESCRIPTION
     45 .P
     46 Starts the server IsrvR listening on IfdR. The optional
     47 IreadR and IcloseR callbacks are called with the IxpConn
     48 structure for the connection as their sole argument.
     49 
     50 .SH RETURN VALUE
     51 .P
     52 Returns the connection's new IxpConn data structure.
     53 
     54 .SH SEE ALSO
     55 .P
     56 ixp_serverloop(3), ixp_serve9conn(3), ixp_hangup(3)
     57 
     58 
     59 .\" man code generated by txt2tags 2.5 (http://txt2tags.sf.net)
     60 .\" cmdline: txt2tags -o- ixp_listen.man3
     61