TCP's three-way handshake, four disconnects
1. Three handshakes
1) The server is in LISTEND, the client sends a request syn=1, ack=0, and the status is SYN_SEND.
2) The server receives the request and returns syn=1, ack=1, status SYN_RCVD
3) ESTABLISHED ESTABLISHED
2, four times disconnected
1) The client initiates a disconnection request and sends FIN=1, ack=0 packet status FIN_WAIT1.
2) The server receives the ACK packet status of the request reply from the client as CLOSE_WAIT.
3) The server sends a confirmation to the client that the FIN status is LAST_ACK, and the client status is FIN_WAIT2.
4) The client receives an acknowledgement from the server and replies to the ACK status as TIME_WAIT. After waiting for 2MSL, it becomes CLOSE.