en

TCP (Transmission Control Protocol) is a transport protocol that provides reliable data delivery between network hosts. It is exactly on top of TCP that HTTP, HTTPS and most everyday services run.

The three-way handshake

Before any data is sent, the client and server establish a connection in three steps: the client sends a SYN packet, the server replies with SYN-ACK, and the client confirms with an ACK. After that the channel is ready. TCP numbers the bytes, acknowledges receipt and retransmits lost packets, guaranteeing that data arrives complete and in the right order.

TCP and UDP

TCP is not the only transport; the choice depends on the task:

  • TCP — when reliability and ordering matter more than speed: web pages, email, file transfer.
  • UDP — when low latency matters more than delivery guarantees: video calls, games, some DNS queries.
  • Ports — both TCP and UDP use port numbers to route traffic to the right application on an IP address.

Understanding TCP helps make sense of how the browser and servers exchange data over the network.

TCP — the three-way handshake
Learn more

Tag cloud