#include <linux_epoll_io_service.h>
|
| ~linux_epoll_io_service () override |
|
bool | is_open () const noexcept |
|
stdx::expected< void, std::error_code > | open () noexcept override |
| open the io-service. More...
|
|
void | on_notify () |
|
void | notify () override |
| notify the poll_one() that something may have changed. More...
|
|
stdx::expected< void, std::error_code > | close () |
|
stdx::expected< void, std::error_code > | add_fd_interest (native_handle_type fd, impl::socket::wait_type wt) override |
|
stdx::expected< void, std::error_code > | add_fd_interest_permanent (native_handle_type fd, impl::socket::wait_type wt) |
|
stdx::expected< void, std::error_code > | remove_fd (native_handle_type fd) override |
|
stdx::expected< void, std::error_code > | remove_fd_interest (native_handle_type fd, uint32_t revents) |
|
std::optional< int32_t > | interest (native_handle_type fd) const |
| get current fd-interest. More...
|
|
stdx::expected< fd_event, std::error_code > | pop_event () |
|
stdx::expected< fd_event, std::error_code > | update_fd_events (std::chrono::milliseconds timeout) |
|
stdx::expected< fd_event, std::error_code > | poll_one (std::chrono::milliseconds timeout) override |
| poll one event from the registered fd-interest. More...
|
|
virtual | ~IoServiceBase ()=default |
|
◆ native_handle_type
◆ ~linux_epoll_io_service()
net::linux_epoll_io_service::~linux_epoll_io_service |
( |
| ) |
|
|
inlineoverride |
◆ add_fd_interest()
◆ add_fd_interest_permanent()
◆ after_event_fired()
◆ close()
stdx::expected< void, std::error_code > net::linux_epoll_io_service::close |
( |
| ) |
|
|
inline |
◆ interest()
std::optional< int32_t > net::linux_epoll_io_service::interest |
( |
native_handle_type |
fd | ) |
const |
|
inline |
get current fd-interest.
- Returns
- fd-interest as bitmask of raw EPOLL* flags
◆ is_open()
bool net::linux_epoll_io_service::is_open |
( |
| ) |
const |
|
inlinenoexcept |
◆ notify()
void net::linux_epoll_io_service::notify |
( |
| ) |
|
|
inlineoverridevirtual |
notify the poll_one() that something may have changed.
can be called from another thread then poll_one().
Implements net::IoServiceBase.
◆ on_notify()
void net::linux_epoll_io_service::on_notify |
( |
| ) |
|
|
inline |
◆ open()
stdx::expected< void, std::error_code > net::linux_epoll_io_service::open |
( |
| ) |
|
|
inlineoverridevirtualnoexcept |
open the io-service.
MUST be called before any of the other functions is called.
may fail if out of file-descriptors.
- Returns
- an std::error_code on error
Implements net::IoServiceBase.
◆ poll_one()
stdx::expected< fd_event, std::error_code > net::linux_epoll_io_service::poll_one |
( |
std::chrono::milliseconds |
timeout | ) |
|
|
inlineoverridevirtual |
poll one event from the registered fd-interest.
removes the interest of the event that fired
- Parameters
-
timeout | wait at most timeout milliseconds |
- Returns
- fd_event which fired
- Return values
-
std::errc::timed_out | in case of timeout |
Implements net::IoServiceBase.
◆ pop_event()
◆ remove_fd()
◆ remove_fd_interest()
◆ update_fd_events()
stdx::expected< fd_event, std::error_code > net::linux_epoll_io_service::update_fd_events |
( |
std::chrono::milliseconds |
timeout | ) |
|
|
inline |
◆ epfd_
◆ fd_events_
std::array<epoll_event, 8192> net::linux_epoll_io_service::fd_events_ {} |
|
private |
◆ fd_events_mtx_
std::mutex net::linux_epoll_io_service::fd_events_mtx_ |
|
private |
◆ fd_events_processed_
size_t net::linux_epoll_io_service::fd_events_processed_ {0} |
|
private |
◆ fd_events_size_
size_t net::linux_epoll_io_service::fd_events_size_ {0} |
|
private |
◆ kAllEvents
constexpr const int net::linux_epoll_io_service::kAllEvents |
|
staticconstexpr |
Initial value:=
static constexpr const int kAlwaysEnabledEvents
Definition: linux_epoll_io_service.h:62
static constexpr const int kSettableEvents
Definition: linux_epoll_io_service.h:61
◆ kAlwaysEnabledEvents
constexpr const int net::linux_epoll_io_service::kAlwaysEnabledEvents = EPOLLHUP | EPOLLERR |
|
staticconstexpr |
◆ kSettableEvents
constexpr const int net::linux_epoll_io_service::kSettableEvents = EPOLLIN | EPOLLOUT |
|
staticconstexpr |
◆ notify_fd_
◆ registered_events_
FdInterest net::linux_epoll_io_service::registered_events_ |
|
private |
◆ wakeup_fds_
The documentation for this class was generated from the following file: