In TCP / IP protocol in, TCP protocol to provide reliableconnectivity, using three shook hands with the establishment of aconnection.
The first handshake: establish a connection, the client sent synpackets (syn = j) to the server and access SYN_SEND state, waitingfor the server to confirm;
Second handshake: Server received syn package, customers mustconfirm the SYN (ack = j +1), while himself a SYN packet sent (syn= k), that is, SYN + ACK packet, then enter the server SYN_RECVstate;
Third handshake: client server received the SYN + ACK packet, sendconfirmation to the server package ACK (ack = k +1), this packagesent completed, the client and server into the ESTABLISHED state,complete the three shook hands.
Complete the three shook hands with the client and server startsending data, in the process, there are some importantconcepts:
Not connected cohort: the three shook hands with the agreement,maintaining a server is not connected queue, as the team eachclient SYN packet (syn = j) creation of an entry, the entry serverthat has received SYN packet, and customers identified , Isawaiting confirmation, the package. These entries by the logo ofSyn_RECV connected to the server in the state, when the clientserver received the confirmation package, delete the entry into theserver ESTABLISHED state.
Backlog parameters: that is not connected to accommodate thelargest number of the queue.
SYN-ACK re-sent the number of servers End SYN-ACK packets, ifcustomers have not received confirmation package, the firstre-server, waiting for customers for a period of time has not yetreceived confirmation package, the second-Chuan, if re - More thanthe number of requirements for re-largest number of systems toconnect information from the semi-connected in the queue to delete.Note that each re-waiting time does not necessarily the same.
Semi-connected survival time: connect queue is half the entry ofthe most prolonged survival, or services received from the SYNpacket to confirm that the text was invalid, the longest period,the time value of all repeat request of the longest wait for thepackage The total time. Sometimes we also said that the survivaltime for the semi-connected Timeout time, SYN_RECV survivaltime.