the socket listen api backlog parameter specifies the size of the queue is full
accept api is obtained from a full queue, it is not blocked, until a new connection comes in.
listen value specified in size, there is a maximum limit,
The kernel is the limit set in the configuration file:. / Proc / sys / net / core / somaxconn
The default value is 128.
Three-way handshake:
The client sends a packet syn,
Server sends a packet (syn + ack),
The client sends a confirmation ack packet. At this point the connection is completed
Semi connection is completed is unsubstituted queue:
/ Proc / sys / net / ipv4 / tcp_syncookies whether to cache syn
The internal value of the operating system settings in / proc / sys / net / ipv4 / tcp_max_syn_backlog file. The default is 1024
[root@118 ipv4]# cat tcp_timestamps 1 [root@118 ipv4]# cat tcp_thin_linear_timeouts 0 [root@118 ipv4]# cat tcp_fin_timeout 60 [root@118 ipv4]# cat /proc/sys/net/ipv4/tcp_syncookies 1 [root@118 ipv4]# cat tcp_synack_retries 2 [root@118 ipv4]# cat tcp_syn_retries 6
A connection to go through the complete 3-way handshake, after only two handshakes, if not third handshake has been completed, the server will be how to deal with?