TsgcWebSocketHTTPServerProperties › Throttle

Throttle Property

Caps the bandwidth (bits per second) that the server reads from or writes to each connection.

Syntax

public TsgcWSThrottle Throttle { get; set; }

Default Value

Enabled=False

Remarks

When Throttle.Enabled is True the server limits how fast data may be read or written per connection. Use it to prevent a single client from saturating the uplink or to simulate low-bandwidth scenarios during development. Throttling is applied at the socket level and is independent from RateLimiter (which limits request/message rates) or MaxConnections (which caps concurrent sessions).

Example


oServer = new TsgcWebSocketHTTPServer();
oServer.Throttle.BitsPerSec = 65536;
oServer.Throttle.Enabled = true;
oServer.Active = true;

Back to Properties