A list,

UDP
Do not belong to
Link protocol
Low resource consumption
Fast processing speed
Audio, video and general data


The transport layer cannot ensure the reliable transmission of data, only through the application layer to achieve. The implementation mode can refer to the TCP reliability transmission mode, but the implementation is transferred to the application layer instead of the transport layer.

Realization of confirmation mechanism, retransmission mechanism, window confirmation mechanism.

If you do not use the Linux protocol stack and the upper socket mechanism to capture and send packets to achieve reliable transmission, you must use the following functions:

  • Send: packet fragmentation, packet confirmation, and packet retransmission
  • Accept: reordering of packets and determining the serial number of packets

At present, there are the following open source programs using UDO to achieve reliable data transfer, respectively RUDP, RTP, UDT


Second, RUDP

RUDP provides a set of data quality of service enhancement mechanisms, such as congestion control improvements, retransmission mechanisms, and dilution server algorithms, so that the RTP client (real-time location) is presented with a high-quality RTP stream in case of packet loss and network congestion. Reliable UDP congestion control allows TCP flow control behavior without interfering with the real-time characteristics of the protocol.


Third, RTP,

Real-time Transport protocol (RTP) provides end-to-end transmission services with real-time characteristics for data, such as interactive video and audio or analog data under multicast or unicast network services. Applications typically run RTP over UDP to use its multiplexed nodes and validation services; Both protocols provide transport layer protocol functionality. However, RTP can be used with other suitable underlying network or transport protocols. RTP can use the multicast table to transfer data to multiple destinations if the underlying network provides multicast.

RTP itself does not provide on-time delivery mechanisms or other quality of service (QoS) guarantees, but relies on the underlying service area to implement this process. RTP does not guarantee delivery or prevent unordered delivery, nor does it determine the reliability of the underlying network. Sequential transmission is implemented in RTP. Serial numbers in RTP allow the receiver to rearrange the sequence of packets sent and sent, and can also be used to determine the appropriate packet location. For example, in video decoding, sequential decoding is not required.


Four, UDT

Udp-based Data Transfer Protocol (UDT) is an Internet data transfer protocol. The main purpose of UDT is to support mass data transfer over high-speed wide area networks, while TCP, the standard data transfer protocol on the Internet, has poor performance over high bandwidth and long distance networks. As the name suggests, UDT is built on top of UDP and introduces new congestion control and data reliability control mechanisms. UDT is a connection-oriented bidirectional application-layer protocol. It supports both reliable data stream transmission and partially reliable datagram transmission. Since UDT is implemented entirely on UDP, it can also be used in other applications besides high-speed data transmission, such as point-to-point technology (P2P), firewall penetration, multimedia data transmission, and so on.


1. UDT application layer protocol

UDT is not intended to replace TCP in the case of relatively small bottleneck bandwidths and large multivariate short document flows.

The UDT is a friend of TCP and co-exists with TCP. The bandwidth allocated by THE UDT should not exceed the maximum and minimum fair sharing rule based on the max-min rule (Note: the maximum and minimum rule allows UDT to allocate available bandwidth that cannot be used by TCP on high BDP connections).

UDT is duplex, and each UDT entity has two parts: send and receive.

Senders send (and retransmit) application data based on flow control and rate control.

The receiver sends control packets based on packets and control packets, and based on received packets. Sending and receiving programs share the same UDP port for sending and receiving.

The receiver is also responsible for triggering and handling any control events, including congestion control and reliability control and their relative mechanisms, such as RTT estimation, bandwidth estimation, reply and retransmission.

UDT always tries to package application-layer data into a fixed size, unless the data is not that large. Similar to TCP, this fixed packet size is called MSS (Maximum packet size). Since udTS are expected to be used to transmit large data streams, we assume that only a small percentage of irregularly sized packets will be in a UDT session. MSS can be installed through an application, and MTU is the optimal value.

UDT congestion control algorithms combine rate control in Windows (flow control), with the former adjusting the packet sending cycle and the latter limiting the maximum bits of the packet being answered. The parameters used in rate control are updated by bandwidth estimation techniques, which are inherited based on the received packet method. At the same time, the rate control period is a constant to estimate the RTT, the flow control parameter refers to the arrival speed of the data on the other side, and the size of the buffer released by the receiver.


Almost all content from: How to implement udp reliable transmission?