asio C++ library

PrevUpHomeNext
posix::basic_stream_descriptor::wait (1 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);

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.

Example

Waiting for a descriptor to become readable.

asio::posix::stream_descriptor descriptor(io_service);
...
descriptor.wait(asio::posix::stream_descriptor::wait_read);

PrevUpHomeNext