TCP vs UDP
People think TCP and UDP are two names for the same thing. Both send packets, but TCP checks that every packet arrives and in the right order. It sends lost ones again. UDP sends and does not check. TCP is for pages and files that must be whole. UDP is for calls and games, where late data is no use.
Transmission Control Protocol (TCP)
Rules for sending data so it all gets there, in order. Lost packets are sent again.
TCP is the set of rules most apps use to send data safely. Before sending, the two machines agree to talk in a short greeting called a handshake. Each packet gets a number. The receiver says which packets came, and the sender sends lost ones again. The data comes out whole and in the right order.
User Datagram Protocol (UDP)
A fast way to send packets with no delivery checks. Some may be lost.
UDP is a simple set of rules for sending packets with no checks. There is no handshake and no resending. Each packet just goes, and some may be lost or arrive out of order. That makes it fast and light. It suits live calls, games and DNS lookups, where a late packet is no use anyway.
In one line
- Transmission Control Protocol (TCP)
- Rules for sending data so it all gets there, in order. Lost packets are sent again.
- User Datagram Protocol (UDP)
- A fast way to send packets with no delivery checks. Some may be lost.