Introduction – Two Ways to Move Data Across a Network
“A message that arrives perfectly but too late may be useless. A message that arrives quickly but with missing pieces may be just as frustrating.”
This is the trade-off at the heart of two major transport-layer protocols: Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). Every time you download a file, join a video call, open a website or play an online game, applications rely on transport protocols to move data between devices.
TCP focuses on reliable, ordered delivery. UDP keeps the process lightweight and does not build in the same delivery guarantees. Neither protocol is automatically better; the right choice depends on what the application needs.
1. TCP – Building a Reliable Connection
“Before sending the conversation, TCP makes sure both ends are ready to take part.”
TCP is a connection-oriented transport protocol. Before exchanging application data, the two endpoints normally establish a connection using a process called the three-way handshake. This helps both sides synchronize their initial sequence numbers and confirm that communication can begin.
The handshake works in three steps:
- SYN – The client sends a synchronisation message to begin the connection.
- SYN-ACK – The server acknowledges the request and sends its own synchronisation message.
- ACK – The client acknowledges the server’s response. The connection is established, and data transfer can proceed.
Once the connection is active, TCP numbers the bytes it sends. The receiver acknowledges data it has received, allowing the sender to detect missing information and retransmit it when necessary. TCP also reassembles data in the correct order before delivering it to the application. This is why TCP is well suited to tasks such as file transfers, email and many web communications, where missing or rearranged data can cause problems.








