Handshaking

Handshaking is the connection between the computer and a device. Handshaking is required in order to allow both the computer and device to send protocols to each other. During a handshake, the two devices make sure that they know certain connection requirements of each other. For instance, they will need to find out a suitable bit rate and latency for each other. 
Examples of devices that use this method include a modem or another computer. Normally, handshaking happens between two devices. Although, a TCP three-way handshake is a special type of handshake that involves sending a connection from one computer to another, just done three times.
Examples.
TCP three-way handshake.
This method is used to connect two hosts on a computer network together, each host known as the client (the main host) and the server (a distant host), respectively. Once the client wants to make a connection to the server, the client can start a TCP three-way handshake with the server. This will allow the client computer (the main device) to send and receive messages to and from the server (a distant device) once the process is complete. Starting a normal TCP connection requires three separate steps:
In this setup, a synchronize message will request a server to make a connection with each other, while the acknowledgement messages return to the requesting server to let it know the message was received. Letting both hosts send synchronize messages to each other will allow the two hosts to connect with each other in both directions. Each acknowledgement message sent to each other ensures they are still connected with each other.