[Develope]/Network

Reliable UDP

하늘을닮은호수M 2006. 6. 29. 12:20
반응형

출처[http://developer.apple.com/documentation/QuickTime/QTSS/Concepts/chapter_2_section_13.html]

Reliable UDP

Reliable UDP is a set of quality of service enhancements, such as congestion control tuning improvements, retransmit, and thinning server algorithms, that improve the ability to present a good quality RTP stream to RTP clients even in the presence of packet loss and network congestion. Reliable UDP’s congestion control mechanisms allow streams to behave in a TCP-friendly fashion without disturbing the real-time nature of the protocol.

To work well with TCP traffic on the Internet, Reliable UDP uses retransmission and congestion control algorithms similar to the algorithms used by TCP. Additionally, these algorithms are time-tested to utilize available bandwidth optimally.

Relibable UDP features include

  • Client acknowledgment of packets sent by the server to the client

  • Windowing and congestion control so the server does not exceed the currently available bandwidth

  • Server retransmission to the client in the event of packet loss

  • Faster than real-time streaming known as “overbuffering”

Whether a client uses Reliable UDP is determined by the content of the client’s RTSP SETUP request.

In this section:

Acknowledgment Packets
RTSP Negotiation


Acknowledgment Packets

When using Reliable UDP, the server expects to receive an acknowledgment for each RTP packet it sends. If the server does not receive an acknowledgment for a packet, it may retransmit the packet. The client does not need to send an acknowledgment packet for each RTP packet it receives. Instead, the client can coalesce acknowledgments for several packets and send them to the server in a single packet.

The Reliable UDP acknowledgment packet format is a type of RTCP APP packet. After the standard RTCP APP packet headers, the payload for an acknowledgment packet consists of an RTP sequence number followed by a variable length bit mask. The sequence number identifies the first RTP packet that the client is acknowledging. Each additional RTP packet being acknowledged is represented by a bit set in the bitmask. The bit mask is an offset from the specified sequence number, where the high order bit of the first byte in the mask is one greater than the sequence number, the second bit is two greater, and so on. Bit masks must be sent in multiples of four octets. Setting a bit to 0 in the mask simply means that the client does not wish to acknowledge this sequence number right now and does not imply a negative acknowledgment.

Figure 2-13 shows the format of the Reliable UDP acknowledgment packet.


Figure 1-13Reliable UDP acknowledgment packet format

Figure 1-13 Reliable UDP acknowledgment packet format

RTSP Negotiation

Whether to use Reliable UDP is negotiated out of band in RTSP. If a client wants to use Reliable UDP, it should include an x-Retransmit header in its RTSP SETUP request. The body of the header contains the retransmit protocol name (our-retransmit) followed by a list of arguments delimited by the semicolon character.

Currently, one argument can be passed from the client to the server: the window argument. If included, the window argument tells the Reliable UDP server the size of the client’s window in KBytes.

Here is an example:

x-Retransmit: our-retransmit;window=128

The server must echo the header and all parameters. If the x-Retransmit header is not in the SETUP response, the client must assume that Reliable UDP will not be used for this stream. If the server changes the parameter values, the client must use the new values.

반응형