In the TCP/IP protocol, the TCP protocol establishes a reliable connection through three handshakes, as follows:
The following is a small story to understand the specific meaning of the three-time handshake:
One day, the small guest ( client ) is ready to go to the small service ( server ) home to give gifts ( ready to connect with the server ), when walking to the door of the small house found that the small house door locked,
Then shouted, "Little suit, you open the door (try to connect with the server resume), I am a small guest ( send synchronization sequence number Synchronize Sequence Numbers
, identification information ) ", at this point, the small guest enters the state waiting for the response of the small service (the client enters Syn_send), ( thus realizing the first handshake ).
The small suit received the request message from the small guest, replied, "Come, and open the door ( server responds to client requests, establish connection )", at this time the small service has confirmed the arrival of small guests ( service
The syn_recv state ), ( thus achieving a second handshake between the two parties ).
When the small guest received the response information of the small service, and found that the door has been successfully opened (to establish a successful connection ), then the gift to the small service ( send a confirmation packet to the server ), the
After receiving the gift, the small suit closes the door. ( the connection is complete and interrupted, the client and the server enter the established state simultaneously ), ( thus achieving the third handshake ).
The qualifications are shallow, understand poorly, please place and understanding.
Small story understanding three handshake when TCP/IP connection