AN_LISTENSection: Antinat Programmer's Manual (3)
Index Return to Main Contents
The an_listen(3) function is used to wait for an incoming connection on a socket that was created earlier and switched into bound mode using the an_bind_tohostname(3) or an_bind_tosockaddr(3) calls. For proxy-based connections, only one incoming connection is allowed on any listening socket. Accepting a connection will use the primary socket for communication and will not create any other socket.
Although there is planned support for non-blocking sockets in a future release, this call should be considered a blocking call. A non-blocking socket will be silently (and temporarily) changed to a blocking one to process the connection.
- The socket handle is invalid.
- A network error occurred attempting to switch to listen mode. See listen for more information on what could cause this to happen.
- This call cannot be made on the type of socket.
- This call must be called after a prior successful call to an_bind_tosockaddr(3) or an_bind_tohostname(3).
Malcolm Smith <firstname.lastname@example.org>
Time: 14:19:44 GMT, January 09, 2005