TsgcWebSocketServer_HTTPAPIProperties › MaxBandwidth

MaxBandwidth Property

Maximum allowed bandwidth in bytes per second across all connections (zero means unlimited).

Syntax

public int MaxBandwidth { get; set; }

Default Value

0 (unlimited)

Remarks

Caps the aggregate send rate in bytes per second; the value is applied at the URL-group level through the http.sys HttpServerBindingProperty / HttpServerQosProperty settings and enforced by the kernel driver. A value of 0 (the default) disables the limit. Useful to throttle a server that shares bandwidth with other services or to cap egress costs on cloud deployments. Note: the cap applies to outbound traffic only — ingress is not limited by this property. Combine with RateLimiter for finer per-peer control.

Example


oServer = new TsgcWebSocketServer_HTTPAPI();
oServer.Host = "127.0.0.1";
oServer.Port = 80;
oServer.MaxBandwidth = 1048576;
oServer.Active = true;

Back to Properties