TsgcWebSocketServer_HTTPAPI › Properties › MaxConnections
Maximum number of concurrent client connections accepted by the http.sys listener (zero means unlimited).
property MaxConnections: Integer read FMaxConnections write FMaxConnections;
0 (unlimited)
When greater than zero the server refuses new incoming connections once the limit is reached; existing sessions continue unaffected. A value of 0 disables the cap (the default). Use this property to protect the host from resource exhaustion under sudden load or to bound capacity in a load-balanced farm. The value is enforced at the user-mode level after the kernel has accepted the socket; to reject traffic earlier combine with Firewall or RateLimiter.
oServer := TsgcWebSocketServer_HTTPAPI.Create(nil);
oServer.Host := '127.0.0.1';
oServer.Port := 80;
oServer.MaxConnections := 1000;
oServer.Active := true;