First, let's look at the three-time handshake process for TCP
1) First handshake: When establishing a connection, the client sends a SYN packet (SYN=J) to the server and enters the syn_sent state, waiting for the server to confirm; SYN: Synchronous sequence Number (Synchronize Sequence Numbers).
2) Second handshake: The server receives the SYN packet, must confirm the customer's SYN (ACK=J+1), simultaneously also sends a SYN packet (syn=k), namely the Syn+ack packet, at this time the server enters the SYN_RECV state;
3) The third handshake: the client receives the server's Syn+ack packet, sends the acknowledgment packet ack (ACK=K+1) to the server, the packet is sent, the client and the server enter the established (TCP connection succeeds) state, complete three handshake.
Three handshake is completed and the client and server begin to transfer data. The following is a diagram of the three handshake:
Second, we use Wireshark grab bag to see a sub-package situation
1) After filtering the package, it can be seen that the process of three times handshake
2) PSH indicates that there is data data transmission, you can see this is the contract of three times the hair
3) If you want to see the contents of this package in detail, you can view this, select one of the packages and choose follow TCP Stream
4) The last few packages in the figure are four wave-waving processes.
TCP handshake waving and sub-packet sending