TsgcTCPClient › Properties › WriteTimeout

WriteTimeout Property

Maximum duration in milliseconds for sending data to the other peer.

Syntax

property WriteTimeout: Integer read FWriteTimeout write FWriteTimeout;

Default Value

60000

Remarks

The value is read when the socket connects and applied as the SO_SNDTIMEO socket option on Windows, Linux, macOS, iOS and Android. A positive value aborts the send operation when an outgoing buffer cannot be flushed within the specified number of milliseconds. A value of 0 means unset and applies the default of 60000 milliseconds, which is also the value streamed in by a form saved before this property was initialised. A negative value removes the bound completely and lets a send block indefinitely, the same convention ReadTimeout uses with -1.

Example


oTCP := TsgcTCPClient.Create(nil);
oTCP.Host := 'www.esegece.com';
oTCP.Port := 2053;
oTCP.WriteTimeout := 10000;
oTCP.Active := true;

Back to Properties