|
XSocket API
2.0
XIA Socket Library
|
Xlisten() - listen for connections on a socket. More...
#include "Xsocket.h"Functions | |
| int | Xlisten (int sockfd, int backlog) |
| listen for connections on a socket More... | |
| int Xlisten | ( | int | sockfd, |
| int | backlog | ||
| ) |
Xlisten() marks the socket referred to by sockfd as a passive socket, that is, as a socket that will be used to accept incoming connection requests using Xaccept().
The backlog argument defines the maximum length to which the queue of pending connections for sockfd may grow. If a connection request arrives when the queue is full, the client will receive an error with an indication of ECONNREFUSED.
| sockfd | an Xsocket previously created with the SOCK_STREAM type, and bound to a local DAG with Xbind() |
| backlog | the number of outstanding connections allowed in the listen queue |
1.8.11