GNU.WIKI: The GNU/Linux Knowledge Base

  [HOME] [PHP Manual] [HowTo] [ABS] [MAN1] [MAN2] [MAN3] [MAN4] [MAN5] [MAN6] [MAN7] [MAN8] [MAN9]

  [0-9] [Aa] [Bb] [Cc] [Dd] [Ee] [Ff] [Gg] [Hh] [Ii] [Jj] [Kk] [Ll] [Mm] [Nn] [Oo] [Pp] [Qq] [Rr] [Ss] [Tt] [Uu] [Vv] [Ww] [Xx] [Yy] [Zz]


NAME

       ixp_listen, IxpConn

SYNOPSIS

       #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 */
               ...
       }

PARAMETERS

       fs     The file descriptor on which to listen.

       aux    A  piece  of data to store in the connection's aux member of the
              IxpConn data structure.

       read   The function called when the connection has  data  available  to
              read.

       close  A cleanup function called when the connection is closed.

DESCRIPTION

       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.

RETURN VALUE

       Returns the connection's new IxpConn data structure.

SEE ALSO

       ixp_serverloop(3), ixp_serve9conn(3), ixp_hangup(3)



  All copyrights belong to their respective owners. Other content (c) 2014-2018, GNU.WIKI. Please report site errors to webmaster@gnu.wiki.
Page load time: 0.087 seconds. Last modified: November 04 2018 12:49:43.