After the socket socket has been created using socket() and bound to a name with bind(), it may be told to listen for incoming connections on socket. A maximum of backlog incoming connections will be queued for processing.
listen() is applicable only to sockets with type SOCK_STREAM or SOCK_SEQPACKET.
Returns zero on success, or a negative error code on failure. This code may be passed to strerror() to get a textual explanation of the error.