How UDP Works:1. Sender creates data packets (called datagrams)
• Each datagram contains:
• The data being sent
• Source and destination port numbers
• A checksum (for basic error detection)
2. No connection is established
• UDP doesn’t perform a “handshake” like TCP. It just sends the data immediately.
3. Datagrams are sent directly to the receiver
• The receiver gets the packets, but there’s:
• No confirmation that they arrived
• No reordering if they arrive out of order
• No retransmission if a packet is lost
4. Application handles the rest
• The application receiving the data must be able to deal with missing or out-of-order packets if needed.