22#include <boost/asio.hpp>
86 using Base = boost::asio::posix::descriptor;
132 template<
typename Execution_context>
134 typename std::enable_if_t<std::is_convertible_v
136 boost::asio::execution_context&>>*
149 template<
typename Execution_context>
151 typename std::enable_if_t<std::is_convertible_v
153 boost::asio::execution_context&>>*
204 using Base::async_wait;
215template<
typename Execution_context>
218 typename std::enable_if_t<std::is_convertible_v<Execution_context&,
219 boost::asio::execution_context&>>*) :
220 Base(context, hndl.m_native_handle)
223 assert(!hndl.
null());
226template<
typename Execution_context>
228 (Execution_context& context,
229 typename std::enable_if_t<std::is_convertible_v<Execution_context&,
230 boost::asio::execution_context&>>*) :
Useful if using the sync_io pattern within a user event loop built on boost.asio (optionally with flo...
~Asio_waitable_native_handle()
Destructor that does not OS-close ("::close()") the stored native handle (if any) but rather performs...
Asio_waitable_native_handle(const Base::executor_type &ex, Native_handle hndl)
Construct boost.asio descriptor object such that one can async_wait() events on the given non-....
boost::asio::posix::descriptor Base
Short-hand for our base type; can be used for, e.g., Base::wait_write and Base::wait_read.
void assign(Native_handle hndl)
Loads value to be returned by native_handle().
Asio_waitable_native_handle(Asio_waitable_native_handle &&src)
Move-construct.
Native_handle native_handle()
Returns the same Native_handle as passed to original handle-loading ctor or assign(),...
Asio_waitable_native_handle & operator=(Asio_waitable_native_handle &&src)
Move-assign.
Contains common code, as well as important explanatory documentation in the following text,...
A monolayer-thin wrapper around a native handle, a/k/a descriptor a/k/a FD.
bool null() const
Returns true if and only if m_native_handle equals S_NULL_HANDLE.