TsgcWebSocketServer_HTTPAPIProperties › MaxConnections

MaxConnections Property

Maximum number of concurrent client connections accepted by the http.sys listener (zero means unlimited).

Syntax

public int MaxConnections { get; set; }

Default Value

0 (unlimited)

Remarks

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.

Example


oServer = new TsgcWebSocketServer_HTTPAPI();
oServer.Host = "127.0.0.1";
oServer.Port = 80;
oServer.MaxConnections = 1000;
oServer.Active = true;

Back to Properties