TCP and UDP:
A protocol is like a set of rules that helps computers and devices talk to each other. In computer
networks, a protocol explains how to send, receive, and understand data so that everything
works properly and communication is clear.
When two devices want to talk over the internet or Network, they need a way to send messages
back and forth. TCP and UDP are two different methods they can use to send these messages.
Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) both are protocols of
the Transport Layer.
TCP stands for Transmission Control Protocol. TCP is a connection-oriented protocol, meaning
that it requires an established connection before data can be transmitted between two
locations. In addition, TCP features built-in systems that look for errors and guarantee that data
gets delivered in the same order it’s sent.
On the other hand, UDP stands for User Datagram Protocol, a more straightforward,
connectionless Internet protocol that doesn't need error-checking and recovery services. UDP
has no overhead for opening, maintaining, or terminating a connection. UDP continuously sends
data to the recipient, regardless of whether they get it or not.
1 | P a g e Created by Ahmad Ali E-Mail: ahmadalimsc@gmail.com , WhatsApp: 00966564303717
2 | P a g e Created by Ahmad Ali E-Mail: ahmadalimsc@gmail.com , WhatsApp: 00966564303717
Feature TCP (Transmission Control Protocol) UDP (User Datagram Protocol)
Connection Connection-oriented Connectionless
Reliability Reliable – ensures delivery Unreliable – no delivery
guarantee
Error Checking Yes – with acknowledgment & Basic error checking only
retransmission (checksum)
Ordering of Maintains order No guarantee of order
Packets
Speed Slower due to checks Faster due to no overhead
Overhead Higher – extra features add weight Lower – minimal processing
Use Cases Web (HTTP/HTTPS), Email, File Video calls, Streaming, Online
Transfers Games
Data Flow Control Yes – manages flow using windowing No flow control
Congestion Yes – avoids network overload No – sends data regardless
Control
Broadcasting TCP does not support broadcasting UDP supports broadcasting
Retransmission TCP can retransmit lost packets UDP has no lost packet
retransmission capability
Handshake Uses handshakes no handshake
Weight TCP is heavy-weight UDP is lightweight,
Packet Structure Complex header with various fields Simple header with fewer fields
Delivery Delivery is guaranteed Delivery is not guaranteed
3 | P a g e Created by Ahmad Ali E-Mail: ahmadalimsc@gmail.com , WhatsApp: 00966564303717