#define LISTENQ 1024
Listen(listenfd, LISTENQ);
By calling listen, the socket is converted into a listening socket, on which incoming connections from clients will be accepted by the kernel. These three steps, socket, bind, and listen, are the normal steps for any TCP server to prepare what we call the listening descriptor (listenfd in this example).
LISTENQ : It specifies the maximum number of client connections that the kernel will queue for this listening descriptor.
No comments:
Post a Comment