What is TCP?

A connection-oriented protocol that ensures reliable, ordered delivery of data.

Detailed Explanation

TCP establishes a connection between sender and receiver through a three-way handshake, then guarantees that all data arrives in order and without errors. It uses acknowledgments, retransmission, and flow control to ensure reliability. While this adds overhead compared to UDP, it's essential for applications where data accuracy is critical, like web browsing, email, and file transfers.

Examples

  • HTTP/HTTPS uses TCP for reliable web page delivery
  • Email protocols (SMTP, IMAP, POP3) rely on TCP
  • File transfers via FTP or SFTP use TCP