TsgcWebSocketServer_HTTPAPI › Properties › MaxBandwidth
Maximum allowed bandwidth in bytes per second across all connections (zero means unlimited).
public int MaxBandwidth { get; set; }
0 (unlimited)
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.
oServer = new TsgcWebSocketServer_HTTPAPI();
oServer.Host = "127.0.0.1";
oServer.Port = 80;
oServer.MaxBandwidth = 1048576;
oServer.Active = true;