kids encyclopedia robot

Handshaking (computing) facts for kids

Kids Encyclopedia Facts

Handshaking is like a digital "hello" between two electronic devices, such as your computer and a modem or another computer. It's a special way for them to connect and agree on how they will talk to each other.

Imagine two people meeting for the first time. They might shake hands and then decide how they'll communicate, like if they'll speak loudly or softly. In the same way, when devices "handshake," they figure out important things. For example, they decide on the best bit rate (how fast data can move between them) and latency (how long it takes for data to travel from one to the other). This process makes sure they can send and receive information smoothly.

Handshaking usually happens between two devices. However, there's a special type called a TCP three-way handshake. This involves one computer sending a connection request to another, but it's done in three specific steps to make sure everything is set up correctly.

How Devices Connect

TCP Three-Way Handshake Explained

The TCP three-way handshake is a very common way for two devices on a computer network to connect. We often call these devices a client (like your computer) and a server (a distant computer that stores information, like a website).

When your computer (the client) wants to connect to a server, it starts this three-step handshake. Once it's finished, your computer can send and receive messages to and from the server. Here are the three steps:

  • Step 1: The "Hello" Message

The client (let's call it Alice) sends a special "synchronize" (SYN) message to the server (Bob). This message includes a unique number, like a secret code, that Alice is using to start the conversation. Bob then receives this number from Alice.

  • Step 2: The "I Got It, And Here's Mine" Message

Bob replies to Alice with a "synchronize-acknowledgment" (SYN-ACK) message. This message does two things: * It tells Alice that Bob received her "hello" message. * It sends Alice Bob's own unique number, plus a number that confirms he got Alice's original number. Alice then gets this message from Bob.

  • Step 3: The "Okay, Let's Talk" Message

Alice sends one more message back to Bob, called an "acknowledgment" (ACK) message. This message confirms that Alice received Bob's message. At this point, Bob knows everything is ready, and he doesn't need to reply to this last message.

So, a "synchronize" message asks a server to connect. The "acknowledgment" messages let the other device know that a message was received. By sending these messages back and forth, both devices confirm they are ready to talk in both directions. Each acknowledgment also helps make sure they are still connected.

kids search engine
Handshaking (computing) Facts for Kids. Kiddle Encyclopedia.