- handle:blocking(flag)
- flag = handle:blocking()
SYNOPSIS
DESCRIPTION
First variant enables or disables blocking mode of the file handle, while second variant returns the current state of the blocking mode flag.
In blocking mode, operations on a file that cannot complete immediately will cause the application to stop (block) until completion. Examples are reading from a serial port that has no data received yet or waiting for incoming network connections on a TCP server socket.
In non-blocking mode, no subsequent operation on the open file will cause the calling process to wait. Instead, all functions that would cause a wait will instead return an error indicating that condition.
RETURN VALUE
Second variant returns a boolean, with true indicating blocking mode.