readTimeout
- global property
The readTimeout
global property controls the maximum length of time the read command will wait for the requested data to become available. Note that data read from a file should be available immediately, so this only affects reading from sockets, processes, or standard input.
- The behavior of the "read ... until end" command for sockets and processes. If no input is immediately available from that socket or process, the command will continue to wait until either some input is available, or the duration of
the readTimeout
has elapsed. This greatly simplifies reading when some input is expected:
read from process myProc until end -- waits for some response
- The open socket command can be aborted. In addition it will time out and stop trying to connect if it fails to establish a connection within the readTimeout seconds.
- Related: read, open socket