The TCP handshake is a process used to establish a reliable connection between two devices over a network. It involves three steps, often referred to as the "three-way handshake." Here’s how it works:
-
SYN (Synchronize): The client sends a SYN packet to the server to initiate a connection. This packet includes a sequence number to start the communication.
-
SYN-ACK (Synchronize-Acknowledgment): The server responds with a SYN-ACK packet. This packet acknowledges the receipt of the client's SYN packet and also includes its own SYN packet to establish a connection.
-
ACK (Acknowledgment): The client sends an ACK packet back to the server, confirming that it received the server's SYN-ACK packet.
Once this three-step process is complete, a reliable TCP connection is established, allowing data to be transmitted between the client and server.
