MainExamplesHistoryRecommended Reading
Explain /Web Technology

What is TCP?

Help others learn from this page

TCP (Transmission Control Protocol) is a reliable protocol for sending data over networks. It's like sending a registered letter with delivery confirmation — you know it arrived, and if it didn't, you'll be notified.

How TCP Works:

  • Connection-oriented: Establishes a connection before sending data
  • Reliable: Guarantees data arrives in order and intact
  • Error checking: Detects and retransmits lost packets
  • Flow control: Adjusts speed based on receiver's capacity

TCP vs UDP:

  • TCP: Reliable, ordered, connection-based (like a phone call)
  • UDP: Fast, unordered, connectionless (like shouting in a crowd)

TCP Handshake:

  1. SYN: Client says "I want to connect"
  2. SYN-ACK: Server says "OK, let's connect"
  3. ACK: Client says "Great, let's start"
  4. Data transfer begins

When TCP is Used:

  • Web browsing: HTTP uses TCP
  • Email: SMTP uses TCP
  • File transfer: FTP uses TCP
  • Anywhere reliability matters: When you need guaranteed delivery

FAQ

Is TCP always better than UDP?
No! TCP's reliability comes with overhead. For real-time games or video streaming, UDP's speed might be more important than perfect delivery.
What's the difference between TCP and HTTP?
TCP is the transport protocol (how data moves). HTTP is the application protocol (what the data means). HTTP runs on top of TCP.

Enjoyed this explanation? Share it!

Promote your content

Reach over 400,000 developers and grow your brand.

Join our developer community

Hang out with over 4,500 developers and share your knowledge.