boost::capy::ready
Create an immediate awaitable for a successful io_result.
Synopsis
Declared in <boost/capy/ex/immediate.hpp>
immediate<io_result>
ready() noexcept;
Description
This helper creates an immediate wrapping an io_result with no error and the provided values.
Example
immediate<io_result<std::size_t>>
write(const_buffer buf)
{
auto n = write_sync(buf);
return ready(n); // success with n bytes
}
immediate<io_result<>>
connect()
{
connect_sync();
return ready(); // void success
}
See Also
immediate, io_result
Created with MrDocs