LearnViz CompSci
Home / Learn / Computer Networks / TCP

Intermediate Topic 19 of 50 Computer Networks

TCP

Reliable ordered connection-oriented transport protocol.

How it works

The Transmission Control Protocol provides a reliable, ordered, byte-stream connection between two hosts. It establishes a connection with a handshake, numbers each byte with sequence numbers, acknowledges received data, retransmits lost segments, controls flow with a receive window and adjusts the sending rate to avoid congestion. It closes with a FIN exchange.

Step-by-step walkthrough

  1. The client opens a connection.
  2. Data is split into numbered segments.
  3. The server acknowledges what it received.
  4. Lost segments are retransmitted.
  5. The connection closes cleanly with FIN, so data arrives complete and in order.

Where it is used

Web traffic, email, file transfer, SSH and database connections use TCP when completeness matters more than the lowest latency.

Common pitfall

Head-of-line blocking delays all later data when one segment is lost. Handshakes and slow start add latency for short connections. TCP is a stream with no message boundaries, so applications must frame messages themselves. Lingering connections consume resources and TIME_WAIT can exhaust ports. Tune with keep-alives and timeouts, and use connection pooling.

Where it fits in the course

TCP is topic 19 of 50 in Computer Networks, rated Intermediate. It follows Wi-Fi. The next topic is UDP.

Practice and explore

How to study this topic

  1. Read the explanation above and restate the definition in your own words.
  2. Open the interactive lesson and answer its mini quiz.
  3. Read the common pitfall, then write a short example that avoids it.
  4. Check your understanding in the Computer Networks quiz, and revisit the topic if you miss a question.

Frequently asked questions

What is TCP?
Reliable ordered connection-oriented transport protocol. It belongs to Computer Networks and is an intermediate-level topic.
Where do people use TCP?
Web traffic, email, file transfer, SSH and database connections use TCP when completeness matters more than the lowest latency.
What is the most common mistake with TCP?
Head-of-line blocking delays all later data when one segment is lost.
What should I learn before this topic?
Start with Wi-Fi, the topic just before it in Computer Networks.
How can I practice it?
Answer the mini quiz in the interactive lesson, then take the Computer Networks quiz.
Is TCP hard to learn?
It is an Intermediate topic. Be comfortable with the Beginner topics in this area first, then read the common pitfall carefully, since it is where most mistakes happen.
How long does it take to learn TCP?
Most learners can read the explanation and finish the interactive lesson in under an hour. Fluency comes from applying the idea, so plan a few short practice sessions with the quiz.
Which topics are related to TCP?
Wi-Fi, UDP, Packet Switching are closely connected. The full list is in the related topics section of this page.
What should I study after TCP?
Continue with UDP, the next topic in Computer Networks.

Related topics