link: Web Communication Protocols, TCP vs UDP

TCP (Transmission Control Protocol)

Overview

Transmission Control Protocol (TCP) is a core protocol of the Internet Protocol(IP) Suite, often referred to as TCP/IP. TCP is vital for managing data transmission between computers in a network, ensuring reliability and order, making it fundamental for internet communications.

Key Features of TCP

TCP is designed to provide a reliable, ordered flow of data between hosts. Here are some of its primary features:

  • Reliable Delivery: TCP ensures that data sent during a communication session will reach its destination without errors and in the same order it was sent.
  • Sequencing and Ordering: Data packets are sequenced so that they can be reassembled in the correct order upon reaching their destination.
  • Error Detection: Includes checksums in the header for error-checking data as it arrives at the destination.
  • Flow Control: Uses windowing techniques to control the volume of data that a sender can send before needing acknowledgment from the receiver.
  • Congestion Control: Dynamically adjusts the data transfer rate in response to the network’s perceived load to prevent congestion.

How TCP Works

TCP manages sessions using a system of signals and responses that establish reliability and flow control:

Connection Establishment: The Three-Way Handshake:

TCP connections are initiated with a three-way handshake, which is crucial for establishing a reliable connection between sender and receiver:

Three-Way Handshake Process:

  1. SYN: The client sends a SYN (synchronize) packet to the server to initiate a new connection.

  2. SYN-ACK: The server responds with a SYN-ACK (synchronize-acknowledge) packet, indicating that it received the client’s SYN.

  3. ACK: The client sends an ACK (acknowledge) packet back to the server, after which the connection is established, and data transfer can begin.

    Flow

    Link to original

Conclusion

TCP is a cornerstone protocol for the internet, enabling reliable and ordered data transmission across networked systems. Its comprehensive approach to data delivery, error handling, and congestion control makes it indispensable for ensuring the integrity and reliability of data communication.