Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
posix::basic_stream_descriptor::wait (2 of 2 overloads)

Inherited from posix::basic_descriptor.

Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions.

void wait(
    wait_type w,
    boost::system::error_code & ec);

This function is used to perform a blocking wait for a descriptor to enter a ready to read, write or error condition state.

Parameters

w

Specifies the desired descriptor state.

ec

Set to indicate what error occurred, if any.

Example

Waiting for a descriptor to become readable.

boost::asio::posix::stream_descriptor descriptor(my_context);
...
boost::system::error_code ec;
descriptor.wait(boost::asio::posix::stream_descriptor::wait_read, ec);

PrevUpHomeNext