User Tools

Site Tools


en:network_terms:udp

User Datagram Protocol

The user datagram protocol, or short UDP, is a network protocol, that is widely used for computer games. The communication does use a network address and a port, but in contrast to TCP, the communication is connection less, meaning, it does not have any state, that defines whether the communication is “connected” or the connection being “established” or data being received or correct.

UDP's disadvantages are, that it is not really reliable. A package may arrive its destination or not. No one will ever know for sure, neither the sender nor the recipient. Also the data might get corrupted on the way. There are no check sums to find out. So in essence, when there is no reply from the other side, you do not know, whether the recipient is not even there, your packages are just not reaching the destination, are received as unreadable, or the other way around, the answers are not reaching you properly. It's like throwing a message in a bottle into the river, hoping it will get to the desired person, which can read it and will be there to receive the message. That makes UDP difficult to diagnose, when something goes wrong.

On the other hand it has the advantage of being very fast. No handshakes being done to establish a state “connected”. No reply that a package has arrived and no waiting for data from the sender. No check-overhead for garbled data, no re-send data if not received. (See also TCP on the matter.) This is precisely why UDP is used in fast paced communication, as computer games require them. There is little point for a shooter server to wait for the client's packages while the game simply continues. It would take too long. Also latencies are important. The faster the better. This cannot be done via TCP in a fast fashion. As modern connections are mostly reliable, speed for possible information loss is an acceptable compromise. This is also, why cable connections, which are known to be more reliable than wireless connections, give a better performance when it comes to loss and lag.

See Also

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
en/network_terms/udp.txt · Last modified: 2022-04-02-11-10 by 7saturn

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki