Inherited from basic_socket.
Wait for the socket 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 socket to enter a ready to read, write or error condition state.
Specifies the desired socket state.
Waiting for a socket to become readable.
std::experimental::net::ip::tcp::socket socket(io_context); ... socket.wait(std::experimental::net::ip::tcp::socket::wait_read);