UDP is an alternative to TCP for establishing low-latency, loss-tolerating connections between applications.
UDP datagrams are treated as a fire-and-forget protocol, that is the sender cannot be sure the datagram was received intact.
UDP is considered a connectionless protocol because it doesn't require a virtual circuit to be established before any data transfer occurs.
On top of the IP layer, UDP provides two services:
- port numbers to distinguish between user requests
- checksum capability to verify data arrived intact
UDP Header
- source port number (number of the sender)
- destination port number (the port the datagram is addressed to)
- length (length in bytes of the UDP header and any encapsulated data)
- checksum (used in error checking)
UDP does provide two important functions for us
- it operates at near line speed
- there is no protocol delay