TsgcWebSocketHTTPServerProperties › MaxConnections

MaxConnections Property

Maximum number of concurrent client connections accepted by the server.

Syntax

public int MaxConnections { get; set; }

Default Value

0 (unlimited)

Remarks

When MaxConnections is greater than zero the server refuses new incoming TCP connections once the limit is reached; existing sessions are unaffected. Use this property to protect the host from resource exhaustion under sudden load or to cap capacity in a load-balanced farm. A value of 0 disables the limit. Combine with RateLimiter or Firewall for finer-grained admission control.

Example


oServer = new TsgcWebSocketHTTPServer();
oServer.Port = 80;
oServer.MaxConnections = 1000;
oServer.Active = true;

Back to Properties