in TCP/IP, TCP provides reliable connection services and uses three-way handshakes to establish a connection.
first handshake: when a connection is established, the client sends the SYN Packet (SYN = J) to the server and enters the syn_send status, waiting for confirmation from the server.
second handshake: when the server receives the SYN packet, it must confirm the customer's Syn (ACK = J + 1) and send a SYN Packet (SYN = K), that is, the SYN + ACK packet, the server enters the syn_recv status.
the third handshake: the client receives the SYN + ACK packet from the server and sends the ACK (ACK = k + 1) Confirmation packet to the server, the client and server enter the established status and complete the three-way handshake.
with this three-way handshake, the client establishes a reliable duplex connection with the server to start data transmission.
the main purpose of the three-way handshake is to ensure that the connection is duplex, and the reliability is more guaranteed by the retransmission mechanism.
as a result, B listened to the song with a headset and did not respond. A thought: Communication fails if he doesn't speak to you. It indicates that communication fails if Party B fails to accept the information transmitted by Party.
If Party B hears what party A says, the first conversation is successful and the second one is followed. In the second conversation,
If Party B heard Party A, he made a correct response and asked, "I have eaten, what about you? The second handshake is successful.
the previous two conversations prove that Party B can understand what party A said and make a correct response.
The following is the third dialog. The third conversation:
If Jia has made the correct response: I have also eaten. The third conversation was successful, and the two had established a smooth communication channel. Then they began to continue chatting.
the second and third conversations prove that Party A can understand what party B says and make a correct response.
in order to ensure that the server can receive the client information and make a correct response, it performs the first two handshakes (the first and second,
in order to ensure that the client can receive information from the server and make a correct response, the next two (second and third) handshakes are performed.
first time: A-B, B Response
second time: B response is correct, B-a, third time: a response is correct, success ------------------------------------------------
TCP three-way handshake