This function is used to set the I/O mode of handle h. The I/O mode can be either blocking or non-blocking. If argument m is SANE_TRUE, the mode is set to non-blocking mode, otherwise it's set to blocking mode.
SANE_Status sane_set_io_mode (SANE_Handle h, SANE_Bool m);By default, newly opened handles operate in blocking mode. A backend may elect not to support non-blocking I/O mode. In such a case the status value SANE_STATUS_UNSUPPORTED is returned. Blocking I/O must be supported by all backends, so calling this function with argument m set to SANE_FALSE is guaranteed to complete successfully.
This function may fail with one of the following status codes: