TsgcWebSocketServer_HTTPAPIProperties › Timeouts

Timeouts Property

Overrides the default http.sys request, entity-body, keep-alive and send-rate timeouts.

Syntax

property Timeouts: TsgcWSTimeouts_HTTPAPI read FTimeouts write SetTimeouts;

Default Value

Enabled=False, EntityBody=120, DrainEntityBody=120, RequestQueue=120, IdleConnection=120, HeaderWait=120, MinSendRate=150

Remarks

Set Enabled to True and assign values to the sub-properties to override the built-in http.sys timeouts on the request queue. EntityBody is the number of seconds allowed for the request entity body to arrive; DrainEntityBody is the time allowed for the server to drain the entity body on a Keep-Alive connection; RequestQueue is how long a request may remain in the kernel queue before user-mode picks it up; IdleConnection closes idle Keep-Alive connections after the given number of seconds; HeaderWait limits the time to parse request headers. MinSendRate is expressed in bytes per second and sets the minimum send rate for responses (the kernel default is 150 bytes/sec). Values of 0 keep the kernel defaults for that sub-field.

Example


oServer := TsgcWebSocketServer_HTTPAPI.Create(nil);
oServer.Host := '127.0.0.1';
oServer.Port := 80;
oServer.Timeouts.Enabled := true;
oServer.Timeouts.EntityBody := 60;
oServer.Timeouts.HeaderWait := 30;
oServer.Timeouts.IdleConnection := 120;
oServer.Timeouts.MinSendRate := 150;
oServer.Active := true;

Back to Properties