Table of Contents
    Home / Definitions / Transmission Control Protocol (TCP)
    Development 3 min read

    Transmission Control Protocol (TCP)

    TCP is an abbreviation of Transmission Control Protocol, and pronounced as separate letters. TCP is one of the main protocols in TCP/IP networks. Whereas the IP protocol deals only with packets, TCP enables two hosts to establish a connection and exchange streams of data. TCP guarantees delivery of data and also guarantees that packets will be delivered in the same order in which they were sent.

    How does a TCP connection work?

    To establish a TCP connection, a conversation needs to happen between the client and server. This is commonly referred to as the three-step handshake:

    1. The client initiates contact with a SYN (synchronize) packet and a random number as an error-checking measure. (More on that later.)

    2. Once the server receives the packet, it returns the signal to begin the connection by sending a SYN-ACK packet and increasing the original random number by one. The server also sends its own random number to the client.

    3. The last step is for the client to send an ACK (acknowledgement) packet to the server once it receives the transmission in step two. The client also increases both random numbers by one and returns them to the server.

    Once the TCP connection is established, the server and client can begin transmitting data immediately. It is important to note that if there is a delay in receiving the acknowledgement (SYN-ACK or ACK) packets, a process called retransmission timeout is used to automatically retransmit a packet after a specified duration of time.

    How long does a TCP connection last?

    In theory, TCP connections can last indefinitely once they have been established. In practice, however, they will typically only last until an outside force intervenes or causes an interruption in the connection, such as a NAT router, firewall, bandwidth issues, etc. A keepalive signal is used in most instances to regularly validate an idle connection and prevent any interruption or breakage. If the keepalive signal is not sent or received after a specified duration of time (depending on the connection s unique transmission speed), the connection times out and needs to be reestablished.

    Are TCP and UDP different?

    Yes. While there are similarities in what TCP and UDP (user datagram protocol) do and where they operate within an IP stack, there is a clear distinction in how they work and when they are used. Voice and video traffic is generally sent via UDP, and a number of internet applications use the protocol, such as the Domain Name Service (DNS), SNMP and DHCP.



    Establishes connection between server and client before sharing any data

    Starts sending data before connection is established

    Provides error checking during transmission to ensure data is delivered completely, in order, and without damage

    Does not guarantee data delivery, order, or accuracy

    Uses transmission buffers to control flow of data

    Transmits data continuously or drops unsuccessful transmissions

    Relatively slower than UDP

    Relatively faster than TCP

    Uses: high-reliability requirements (e.g. HTTP/HTTPS, FTP, email, etc.)

    Uses: high-speed and efficiency requirements (e.g. video streaming, DNS, VoIP, etc.)