TsgcWebSocketHTTPServerプロパティ › Throttle

Throttle プロパティ

サーバーが各接続から読み取るまたは書き込む帯域幅 (ビット/秒) を制限します。

構文

property Throttle: TsgcWSThrottle read GetThrottle write SetThrottle;

デフォルト値

Enabled=False

解説

Throttle.EnabledTrue の場合、サーバーは接続ごとのデータの読み取りまたは書き込みの速度を制限します。単一クライアントがアップリンクを飽和させるのを防いだり、開発中に低帯域幅シナリオをシミュレートしたりするために使用します。スロットリングはソケットレベルで適用され、RateLimiter(リクエスト/メッセージレートを制限)または MaxConnections(同時セッション数を制限)とは独立しています。

使用例


oServer := TsgcWebSocketHTTPServer.Create(nil);
oServer.Throttle.BitsPerSec := 65536;
oServer.Throttle.Enabled := true;
oServer.Active := true;

プロパティに戻る