MySQL 9.1.0
Source Code Documentation
|
io_service based on the poll() system-call. More...
#include <poll_io_service.h>
Classes | |
class | FdInterests |
Public Member Functions | |
~poll_io_service () override | |
bool | is_open () const noexcept |
stdx::expected< void, std::error_code > | open () noexcept override |
open the io-service. 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 event) override |
stdx::expected< void, std::error_code > | remove_fd (native_handle_type fd) override |
remove fd from interest set. More... | |
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 |
void | on_notify () |
void | notify () override |
stdx::expected< void, std::error_code > | remove_fd_interest (native_handle_type fd, short event) |
remove interest of event from fd. More... | |
Public Member Functions inherited from net::IoServiceBase | |
virtual | ~IoServiceBase ()=default |
Static Public Member Functions | |
static stdx::expected< short, std::error_code > | poll_event_from_wait_type (impl::socket::wait_type event) |
Static Public Attributes | |
static constexpr const short | kSettableEvents = POLLIN | POLLOUT |
static constexpr const short | kAlwaysEnabledEvents = POLLHUP | POLLERR |
static constexpr const short | kAllEvents |
Private Attributes | |
std::pair< impl::socket::native_handle_type, impl::socket::native_handle_type > | wakeup_fds_ {impl::socket::kInvalidSocket, impl::socket::kInvalidSocket} |
FdInterests | fd_interests_ |
std::list< fd_event > | triggered_events_ |
std::mutex | mtx_ |
Additional Inherited Members | |
Public Types inherited from net::IoServiceBase | |
using | native_handle_type = impl::socket::native_handle_type |
io_service based on the poll() system-call.
|
inlineoverride |
|
inlineoverridevirtual |
Implements net::IoServiceBase.
|
inline |
|
inline |
get current fd-interest.
|
inlinenoexcept |
|
inlineoverridevirtual |
Implements net::IoServiceBase.
|
inline |
|
inlineoverridevirtualnoexcept |
open the io-service.
MUST be called before any of the other functions is called.
may fail if out of file-descriptors.
Implements net::IoServiceBase.
|
inlinestatic |
|
inlineoverridevirtual |
Implements net::IoServiceBase.
|
inline |
|
inlineoverridevirtual |
remove fd from interest set.
Implements net::IoServiceBase.
|
inline |
remove interest of event from fd.
mtx_ must be held, when called.
|
inline |
|
private |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
private |
|
private |
|
private |