Computer Network Review---UDP

UDP is a simple transport layer protocol. Compared with TCP, UDP has the following notable features:

  • UDP lacks reliability. UDP itself does not provide confirmation, sequence number, timeout retransmission and other mechanisms. UDP datagrams may be copied and reordered in the network. That is, UDP does not guarantee that the datagram will reach its final destination, nor does it guarantee the sequence of each datagram, nor does it guarantee that each datagram will arrive only once.
  • UDP datagrams have length. Each UDP datagram has a length. If a datagram arrives at the destination correctly, the length of the datagram will be passed to the receiver along with the data. And TCP is a byte stream protocol, there is no record boundary (on the protocol).
  • UDP is connectionless. The UDP client and server do not have to have a long-term relationship before. Before UDP sends datagrams, there is no need to go through a handshake to establish a connection.
  • UDP supports multicast and broadcast.

scenes to be used

  1. Requires less resources, in the internal network with good network conditions or applications that are not sensitive to packet loss,
  2. Not only one-to-one communication, broadcast
  3. Need fast processing speed, low latency, and can tolerate a small number of packet loss

Several specific applications

  • QUIC
  • Streaming media protocol RTMP
  • Real-time game
  • Internet of Things

Guess you like

Origin blog.csdn.net/why1092576787/article/details/114791954