24#ifndef LELY_IO2_POSIX_POLL_HPP_
25#define LELY_IO2_POSIX_POLL_HPP_
46 if (!poll_) util::throw_errc(
"Poll");
53 Poll& operator=(
const Poll&) =
delete;
56 operator=(Poll&&
other)
noexcept {
58 swap(poll_,
other.poll_);
65 operator io_poll_t*()
const noexcept {
return poll_; }
82 ::std::error_code& ec)
noexcept {
88 ec = util::make_error_code();
97 if (ec) throw ::std::system_error(ec,
"watch");
The abstract polling interface.
A refence to an I/O context. This class is a wrapper around #io_ctx_t*.
The system-dependent I/O polling interface.
void watch(int fd, Event events, struct io_poll_watch &watch, ::std::error_code &ec) noexcept
ContextBase get_ctx() const noexcept
Poll(ContextBase &ctx, int signo=0)
void watch(int fd, Event events, struct io_poll_watch &watch)
ev::Poll get_poll() const noexcept
This header file is part of the I/O library; it contains the C++ interface for the I/O context.
This header file is part of the utilities library; it contains C++ convenience functions for creating...
This header file is part of the event library; it contains the C++ interface for the abstract polling...
This header file is part of the I/O library; it contains the C++ interface for the I/O events.
Event
The type of I/O event monitored by lely::io::Poll::watch() and reported to io_poll_watch_func_t callb...
This header file is part of the I/O library; it contains the I/O polling declarations for POSIX platf...
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.
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.
void io_poll_destroy(io_poll_t *poll)
Destroys an I/O polling interface.
io_poll_t * io_poll_create(void)
Creates a new I/O polling interface.
An I/O polling interface.
An object representing a file descriptor being monitored for I/O events.