We often call the UDP protocol, that is, the User Datagram Protocol. It defines the protocol used to provide Packet Exchange for computer communication in the interconnection network environment. By default, this Protocol considers the Network Protocol IP address as its underlying protocol. This Protocol provides the simplest Protocol mechanism for sending information to another user program. This Protocol is operation-oriented and does not provide commit and copy protection. If the application requires reliable data transmission, the transmission control protocol TCP should be used ). Another difference of UDP protocol is how to receive multiple burst data packets. Unlike TCP, UDP does not guarantee the order in which data is sent and received. For example, an application on a client sends the following four data packets to the server:
D1
D22
D333
D4444
However, UDP may submit the received data to the application on the server in the following order:
D333
D1
D4444
D22
In fact, this out-of-order nature of UDP is rarely seen. Generally, it can only happen when the network is very crowded.
Application of UDP protocol
Some readers may ask, since UDP is an unreliable network protocol, what is the value or necessity? In fact, in some cases, UDP may become very useful. Because UDP has a speed advantage beyond the reach of TCP. Although various security protection functions are embedded in the TCP protocol, a large amount of system overhead will be occupied during actual execution, and the speed will undoubtedly be seriously affected. In contrast, UDP eliminates the information reliable transfer mechanism and transfers security and sorting functions to upper-layer applications, greatly reducing the execution time and ensuring the speed.
The earliest specification for UDP protocol was RFC768, which was released in 1980. Although it has been a long time, UDP continues to play a role in mainstream applications. Many applications, including video teleconference systems, prove the value of UDP. Compared with reliability, these applications focus more on actual performance. Therefore, in order to achieve better performance, for example, higher image frame refresh rate, certain reliability such as meeting quality can be sacrificed ). This is the trade-off between UDP and TCP. Based on different environments and features, the two transmission protocols will play a more important role in the future online world.