TsgcTCPClient › Properties › Throttle

Throttle Property

Limits the number of bits per second sent or received by the client socket.

Syntax

property Throttle: TsgcWSThrottle read GetThrottle write SetThrottle;

Default Value

Enabled=False

Remarks

Use Throttle to cap the outgoing and incoming bandwidth of the client. Enable the feature and set the desired bits-per-second; the transport layer pauses read/write operations to stay within the limit, which is useful to simulate slow networks or to share upstream bandwidth between connections.

Example


oTCP := TsgcTCPClient.Create(nil);
oTCP.Host := 'www.esegece.com';
oTCP.Port := 2053;
oTCP.Throttle.Enabled := true;
oTCP.Throttle.BitsPerSec := 256 * 1024;
oTCP.Active := true;

Back to Properties