| Home | Libraries | People | FAQ | More

##### posix::basic_stream_descriptor::native_non_blocking (3 of 3 overloads)

Inherited from posix::basic_descriptor.

Sets the non-blocking mode of the native descriptor implementation.

    boost::system::error_code native_non_blocking(
        bool mode,
        boost::system::error_code & ec);

This function is used to modify the non-blocking mode of the underlying native descriptor. It has no effect on the behaviour of the descriptor object's synchronous operations.

###### Parameters

mode

  If `true`, the underlying descriptor is put into non-blocking mode and direct system calls may fail with `boost::asio::error::would_block` (or the equivalent system error).

ec

  Set to indicate what error occurred, if any. If the `mode` is `false`, but the current value of `non_blocking()` is `true`, this function fails with `boost::asio::error::invalid_argument`, as the combination does not make sense.