Lely core libraries
2.3.4
|
Go to the documentation of this file.
24 #ifndef LELY_IO2_POSIX_POLL_HPP_
25 #define LELY_IO2_POSIX_POLL_HPP_
46 if (!poll_) util::throw_errc(
"Poll");
51 Poll(
Poll&& other) noexcept : poll_(other.poll_) { other.poll_ =
nullptr; }
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 {
97 if (ec) throw ::std::system_error(ec,
"watch");
107 #endif // !LELY_IO2_POSIX_POLL_HPP_
void io_poll_destroy(io_poll_t *poll)
Destroys an I/O polling interface.
void watch(int fd, Event events, struct io_poll_watch &watch)
ContextBase get_ctx() const noexcept
Poll(ContextBase &ctx, int signo=0)
An object representing a file descriptor being monitored for I/O events.
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.
A refence to an I/O context. This class is a wrapper around #io_ctx_t*.
ev::Poll get_poll() const noexcept
An I/O polling interface.
int io_poll_watch(io_poll_t *poll, io_handle_t handle, struct io_event *event, int keep)
Registers an I/O device with an I/O polling interface and instructs it to watch for certain events.
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.
The system-dependent I/O polling interface.
The abstract polling interface.
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.
void watch(int fd, Event events, struct io_poll_watch &watch, ::std::error_code &ec) noexcept
Event
The type of I/O event monitored by lely::io::Poll::watch() and reported to io_poll_watch_func_t callb...