TsgcWebSocketHTTPServer › プロパティ › MaxConnections
サーバーが受け入れる同時クライアント接続の最大数。
property MaxConnections: Integer read GetMaxConnections write SetMaxConnections;
0 (無制限)
MaxConnections がゼロより大きい場合、制限に達すると新しい受信TCP接続を拒否します。既存のセッションは影響を受けません。突発的な負荷時のリソース枯渇からホストを保護したり、ロードバランスファームの容量を制限したりするためにこのプロパティを使用します。0 を設定すると制限が無効になります。きめ細かいアドミッションコントロールには RateLimiter または Firewall と組み合わせます。
oServer := TsgcWebSocketHTTPServer.Create(nil);
oServer.Port := 80;
oServer.MaxConnections := 1000;
oServer.Active := true;