Linux in the socket connection queue definition processing on the personal feel is a little pit dad, gossip less, direct talk.
To establish the socket connection process:
1.client sends a SYN request to the server
2.server received after the request is stored in the SYN queue, the maximum value of this half-connection queue is defined by the system parameter Tcp_max_syn_backlog
3. Store in the semi-connected queue after sending Syn+ack to Client,client received and then send Syn+ack to the server to complete three handshake, and then the server to store the connection in the Accept queue, This queue length is the size of the backlog definition defined when the socket is called in the program.
4. The application obtains the connection by calling accept () into the Accept queue.
The features of the pit daddy come! Attention!
What happens when the Accept queue is full?
!! Attention! If the Accept queue is full, Linux will have an exception handler to determine if the Tcp_abort_on_overflow system parameter is 1, and if 1, a denial-of-client termination message is issued and the connection is disconnected. But if this parameter is 0, then the pit Daddy! , the connection to the overflow queue, Linux will not go to it, will continue to establish a normal connection, but not in the accept queue, which means that your program with the Accept () function can not take the connection! This is how the pit father Ah!!! There's no reason to find out, okay?!! All sorts of being misled good!!! Hey, Linux!!
This article from "Dalian People in Beijing" blog, declined to reprint!
Analysis of the connection queue backlog for Linux socket