1. Predetermined hardware or software activity designed to establish or maintain two machines or programs in synchronisation. Handshaking often concerns the exchange of messages or packets of data between two systems with limited buffers. A simple handshaking protocol might only involve the receiver sending a message meaning "I received your last message and I am ready for you to send me another one." A more complex handshaking protocol might allow the sender to ask the receiver if he is ready to receive or for the receiver to reply with a negative acknowledgement meaning "I did not receive your last message correctly, please resend it" (e.g. if the data was corrupted en route).
Hardware handshaking uses voltage levels or pulses on wires to carry the handshaking signals whereas software handshaking uses data units (e.g. ASCII characters) carried by some underlying communication medium.
3. The exchange of predetermined signals between agents connected by a communications channel to assure each that it is connected to the other (and not to an imposter). This may also include the use of passwords and codes by an operator.