TsgcWebSocketServer_HTTPAPI › Eigenschappen › MaxBandwidth
Maximale toegestane bandbreedte in bytes per seconde over alle verbindingen heen (nul betekent onbeperkt).
property MaxBandwidth: Integer read FMaxBandwidth write FMaxBandwidth;
0 (onbeperkt)
Caps the aggregate send rate in bytes per second; de waarde is applied at the URL-group level through the http.sys HttpServerBindingProperty / HttpServerQosProperty settings and enforced by the kernel driver. A value of 0 (de standaardwaarde) disables the limit. Useful to beperken a server that shares bandbreedte with andere services or to cap egress costs on cloud deployments. Note: the cap applies to uitgaand traffic only — ingress is not limited by deze eigenschap. Combine with RateLimiter for finer per-peer control.
oServer := TsgcWebSocketServer_HTTPAPI.Create(nil);
oServer.Host := '127.0.0.1';
oServer.Port := 80;
// cap total egress at 1 MB/sec
oServer.MaxBandwidth := 1048576;
oServer.Active := true;