In contrast, [UDP](https://en.wikipedia.org/wiki/User_Datagram_Protocol) is a connectionless protocol. It allows the transmitting (host, port) end to send a data packet to a destination (host, port) end without requiring an exclusive connection. This leads to unreliable communication. For instance a data packet could be addressed to a certain port on a host, but no process might have acquired the port. This means, the packet will be lost, but UDP provides no acknowledgement to the sending (host, port) end that a failure occurred. Failure can also occur if the data was lost during transmission. It is also possible that data is received in a different order from what was transmitted (out of order delivery). UDP is commonly used in scenarios where speed is prioritized over reliability, such as in real-time applications (e.g., video streaming or online gaming), where the loss or re-sequencing of some data does not significantly impact the overall experience. We will see more details about these protocols in the [TCP Socket Programming](/guides/resources/tcp-socket-programming.md) and [UDP Socket Programming](/guides/resources/udp-socket-programming.md) documentations.
0 commit comments