TsgcWebSocketClientProperties › ReadTimeout

ReadTimeout Property

Maximum time in milliseconds the client waits for incoming data before raising a read timeout.

Syntax

property ReadTimeout: Integer read FReadTimeout write FReadTimeout;

Default Value

-1 (infinite)

Remarks

A value of -1 disables the timeout, letting the client block indefinitely while waiting for bytes to arrive. Setting a positive number of milliseconds causes the socket read call to return an error after the specified idle time; combine this with HeartBeat or WatchDog to detect half-open connections.

Example


oClient := TsgcWebSocketClient.Create(nil);
oClient.URL := 'wss://www.esegece.com:2053';
oClient.ReadTimeout := 30000;
oClient.Active := true;

Back to Properties