Handshake

A handshake is a process that occurs at the beginning of a communication session between two devices (such as a client and a server) to establish a connection and ensure that both parties are ready to exchange data
The most common example is the three-way handshake used by TCP to establish a connection between a client and a server. Here’s how it works:
SYN (Synchronize):
- The client sends a SYN message to the server, indicating it wants to start a connection.
SYN-ACK (Synchronize-Acknowledge):
- The server responds with a SYN-ACK message, acknowledging the client's request and indicating that it's ready to communicate.
ACK (Acknowledge):
- The client sends an ACK message to the server, confirming that the connection is now established.