Skip to main content

Command Palette

Search for a command to run...

From "Am I Audible?" to "Bye": How TCP Communicates Reliably

Updated
5 min read

Think of a situation where two people are talking on the phone line. One person speaks, but the other does not reply. Some words get cut off, some sentences repeat, noise in between, and some never arrive at all. After sometime, the connection breaks down completely.

This is exactly what happens on the internet if the data is sent without rules or protocols.

Networks are not always reliable.
Sometimes networks are noisy.
Data packets can be lost, duplicated, or arrive out of order.

So now the big question is:

“How do computers communicate reliably over the network?”

This is where the concept of TCP comes in.

TCP : Reliable Communication with Discipline

Now the real hero comes into the picture:

TCP (Transmission Control Protocol) brings order, reliability, loss detection, retransmission, flow control, and congestion control, making reliable communication possible over an unreliable network.

We can think of TCP as a well-structured conversation, instead of random shouting.

But as developers, we should ask:

“Why is TCP needed at all?”

Let’s find out.

Why is TCP needed at all ?

First, we need to understand how the Internet moves data.

It sends data as small chunks called packets. These packets may take different paths, travel at different speeds, and there is a high chance they can be dropped along the way.

Now here’s the key idea to understand:

TCP does not control the network itself**,** controls the conversation between two computers**.**

Before sending real data, TCP first asks:

“Are you ready?”
“Can you hear me?”
“Am I audible?”

This brings us to the TCP 3-Way Handshake, an important concept in TCP communication.

How Does the 3-Way Handshake Work?

The term “3-Way Handshake” itself is fundamental to TCP.

It may sound simple, but it plays a critical role in TCP communication. Before a client and a server send any data to each other, TCP first makes sure that both computers are ready to communicate. TCP does not control the network, instead, it controls the conversation between the client and the server. Because the Internet is unreliable, both sides need to confirm that they can reach each other, understand each other, and stay in sync.

This preparation step is called the TCP 3-Way Handshake. It ensures that both computers agree to communicate before the actual data transfer begins.

Understanding the 3-Way Handshake with a Simple Analogy

Think of it like this:

Client: “Am I audible?”
Server: “Yes, I can hear you.”
Client: “Great, let’s start.”

Only after this confirmation does real data begin to flow.
Now, let’s deep dive into this flow and understand how it works under the hood.

Step 1: SYN - “Am I Audible?”

The client sends a SYN message.

Meaning:

  • “I want to connect with you.”

  • “Here is my starting point, Let’s connect.”

At this stage, no actual data is sent, only the intent to communicate.

Step 2: SYN-ACK - “Yes, I Hear You.”

The server replies with a SYN + ACK message.

Meaning:

  • “I received your message.”

  • “Here is my starting point.”

  • “I acknowledge yours.”

At this point, both sides are aware of each other.

Step 3: ACK - “Let’s Begin”

The client sends an ACK message.

Meaning:

  • “I acknowledge your response.”

  • “We are now synchronized.”

Now, the connection is established between the client and the server, and both sides are ready. Actual data can now flow reliably between them.

Now data is broken into small chunks called segments. Each segment is assigned a sequence number, and the receiver sends acknowledgements (ACKs) for the data it receives. The sender keeps track of what has been sent and what has been acknowledged.

Because of this, TCP always knows:

  • What data it has sent?

  • What data has been acknowledged?

  • What data needs to be retransmitted?

This tracking mechanism is one of the core properties of TCP, and it is what makes reliable data transfer possible.

Does TCP mean “Reliability”?

TCP is associated with reliability, but TCP does not mean reliability by itself. Instead, TCP provides reliability on top of an unreliable Internet. The Internet can lose packets, deliver them out of order, or deliver them multiple times.

TCP handles these problems by using:

  • Sequence numbers → to keep data in order.

  • Acknowledgements (ACKs) → to confirm delivery.

  • Retransmission → to resend lost data.

  • Flow control → to avoid overwhelming the receiver.

  • Congestion control → to protect the network.

Because of these mechanisms, TCP can guarantee that data is delivered:

  • Reliably

  • In order

  • Without duplication

So, TCP doesn’t just start and end communication politely. it manages the entire lifecycle, from “Am I audible?” to “Bye.”

That is why TCP is considered the reliability layer of the Internet.

What Is “Bye” in Terms of TCP?

People often think that only the start of communication needs rules, but that is only half correct.

For effective communication, both the beginning and the ending need rules. After the data has been transferred and received successfully, the connection should close properly.

TCP closes connections politely and safely using:

  • FIN → “I’m done sending data.”

  • ACK → “I acknowledge that.”

Both sides agree before disconnecting, which ensures:

  • No sudden cuts.

  • No half-sent data.

The Full TCP Lifecycle

  1. Establish → 3-Way Handshake.

  2. Transfer → Reliable, ordered, and error-free data flow.

  3. Close → FIN and ACK exchange.

From:

“Am I audible ?”

to

“Bye.”

From the first “Am I Audible?” to the final “Bye”, TCP manages the entire journey of communication.