Taking the state confirmation scene of common conversations in life as the starting point, this paper interprets three handshakes and four waves of HTTP easily.
HTTP three handshakes
1. The client sends a status confirmation query to the server (the first handshake);
2. The server confirms the status and asks the client for the status confirmation (the second handshake);
3. The client replies the status confirmation of the server and prepares to establish a connection (the third handshake);
4. Establish a connection between them and transmit data through TCP (establish a connection).
He waved four times
1. The client indicates to the server that it is ready to end the connection (waving for the first time);
2. The server indicates to the client that it is starting to finish the connection (waving for the first time);
3. The server indicates to the client that the connection can be ended (the third wave);
4. The client confirms the end of the connection Reply of the server (the fourth wave);
5. Both end the connection.
Up Master of station B: Programmer’s perspective