24 #ifndef LELY_IO2_WIN32_POLL_HPP_ 25 #define LELY_IO2_WIN32_POLL_HPP_ 45 if (!poll_) util::throw_errc(
"Poll");
50 Poll(
Poll&& other) noexcept : poll_(other.poll_) { other.poll_ =
nullptr; }
52 Poll& operator=(
const Poll&) =
delete;
55 operator=(
Poll&& other) noexcept {
57 swap(poll_, other.poll_);
64 operator io_poll_t*()
const noexcept {
return poll_; }
81 DWORD dwErrCode = GetLastError();
87 SetLastError(dwErrCode);
95 if (ec) throw ::std::system_error(ec,
"register_handle");
105 #endif // !LELY_IO2_WIN32_POLL_HPP_ ev_poll_t * io_poll_get_poll(const io_poll_t *poll)
Returns a pointer to the ev_poll_t instance corresponding to the I/O polling instance.
void register_handle(HANDLE handle)
A refence to an I/O context. This class is a wrapper around io_ctx_t*.
An I/O polling interface.
This header file is part of the I/O library; it contains the I/O polling declarations for Windows...
Poll(ContextBase &ctx, int signo=0)
This header file is part of the I/O library; it contains the C++ interface for the I/O context...
The system-dependent I/O polling interface.
void register_handle(HANDLE handle, ::std::error_code &ec) noexcept
The abstract polling interface.
void io_poll_destroy(io_poll_t *poll)
Destroys an I/O polling interface.
int io_poll_register_handle(io_poll_t *poll, HANDLE handle)
Registers a file handle with (the I/O completion port of) an I/O polling instance.
ev::Poll get_poll() const noexcept
This header file is part of the utilities library; it contains C++ convenience functions for creating...
io_ctx_t * io_poll_get_ctx(const io_poll_t *poll)
Returns a pointer to the I/O context with which the I/O polling instance is registered.
io_poll_t * io_poll_create(void)
Creates a new I/O polling interface.
::std::error_code make_error_code(SdoErrc e) noexcept
Creates an error code corresponding to an SDO abort code.
This header file is part of the event library; it contains the C++ interface for the abstract polling...
ContextBase get_ctx() const noexcept