TsgcWebSocketHTTPServerProperties › Throttle

Throttle Property

서버가 각 연결에서 읽거나 쓰는 대역폭(초당 비트)을 제한합니다.

구문

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;

속성으로 돌아가기