The listen() system call prepares a connection-oriented server to accept client connections.

int listen(int sockfd, struct <backlog>);

The first parameter is the socket descriptor from the socket() call, sockfd.

The second parameter specifies the number of requests that the system queues before it executes the accept() system call. Higher and lower values of <backlog> trade off high efficiency for low latency.

For example:

listen(sockfd, 5);