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
- The client opens a connection.
- Data is split into numbered segments.
- The server acknowledges what it received.
- Lost segments are retransmitted.
- 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
- Open the interactive lesson, with a mini quiz.
- Take the Computer Networks quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Computer Networks quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is TCP?
Where do people use TCP?
What is the most common mistake with TCP?
What should I learn before this topic?
How can I practice it?
Is TCP hard to learn?
How long does it take to learn TCP?
Which topics are related to TCP?
What should I study after TCP?
Related topics
- Wi-Fi (Computer Networks)
- UDP (Computer Networks)
- Packet Switching (Computer Networks)
- Three-Way Handshake (Computer Networks)