When an application puts a socket into LISTEN state using the listen syscall, it needs to specify a backlog for that socket. The backlog is usually described as the limit for the queue of incoming connections. … Only connections in the latter state can be returned to the application by the accept syscall.
What is backlog in Listen function?
The questions is what is the function of the parameter of socket. listen() method (i.e. 5 ). Based on the tutorials around the internet: The backlog argument specifies the maximum number of queued connections and should be at least 0; the maximum value is system-dependent (usually 5), the minimum value is forced to 0.
What does Sock_object listen backlog mean?
sock_object. This method is used to listen to the connections associated with the socket. The backlog parameter indicates the maximum number of queued connections. Maximum value can go up to 5, and the minimum should be at least zero.