Http://jiujiang.blog.sohu.com/98771790.html
The connection process is represented by a series of States: Listen, SYN-SENT, syn-
Received, established, fin-wait-1, fin-wait-2, close-Wait, closing, LAST-ACK,
Time-wait and closed. Closed indicates that no connection exists. The meaning of each status is as follows:
Listen-Listen for connection requests from remote TCP ports;
SYN-SENT-Wait for a matched connection request after sending the connection request;
SYN-RECEIVED-wait for confirmation of connection requests after receiving and sending a connection request;
Established-indicates an opened connection. data can be transmitted to users;
Fin-wait-1-waiting for confirmation of connection interruption requests from remote TCP or previous connection interruption requests;
Fin-wait-2-wait for connection interruption requests from remote TCP;
Close-Wait-wait for the connection interruption request from the local user;
Closing-waiting for confirmation of remote TCP connection interruption;
LAST-ACK-waiting for confirmation of the original connection interruption request sent to remote TCP;
Time-Wait-wait for enough time to ensure that the remote TCP receives the confirmation of the connection interruption request;
Closed-No connection status;
TCP
The connection process is a state conversion, prompting the user to call open, send, receive, close, abort, and status; the transmitted data segment,
Especially for data segments SYN, ack, RST, and fin that contain the following tags, and timeout, TCP status changes as mentioned above.
The following figure shows the transition of TCP status, but this figure does not include errors and error handling. do not regard this figure as a general description.