UDT Reference: CUDT Methods

setRate

The setRate method assigns the initial sending rate for a server.

void setRate(

   const int& rate
);

Parameters

rate
[in] The assigned sending rate, in bps (bits per second).

Return Values

NONE.

Exceptions

A CUDTException exception can be threw out if the rate is not more than 0.

Description

The setRate method assigns an initial sending rate of the server. However, this is not the final initial sending rate, if the client side passes a lower value in the handshake packet. It is often a better way to specify the initial sending rate at the client side with requestRate.

Notes

Although the setRate method is designed to set the initial sending rate, it actually can be called at any phase of the application to modify the sending rate outside UDT.  Because of this feature, setRate method can be used to expand application rate control.

See Also

requestRate