|
Webserv
|
Synchronous event demultiplexer that wraps Linux epoll for I/O event monitoring. More...
#include <EpollManager.hpp>
Public Member Functions | |
| EpollManager () | |
| ~EpollManager () | |
| void | addHandler (IEventHandler *handler, uint32_t events) |
| void | modifyHandler (IEventHandler *handler, uint32_t events) |
| void | removeHandler (IEventHandler const *handler) |
| int | waitForEvents (struct epoll_event *events, int maxEvents, int timeout=-1) |
| void | requestShutdown () |
| bool | getisShuttingDown () const |
Private Member Functions | |
| EpollManager (const EpollManager &other) | |
| EpollManager & | operator= (const EpollManager &other) |
Private Attributes | |
| int | epollFd_ |
| volatile sig_atomic_t | isShuttingDown |
Synchronous event demultiplexer that wraps Linux epoll for I/O event monitoring.
Provides a simplified interface to the epoll system call for detecting when file descriptors are ready for I/O operations without blocking. Acts as the low-level event detection mechanism in the ClientHandler pattern implementation. By "low-level", it means epoll() is a system call to communnicate with the kernal space from the user space
| network::EpollManager::EpollManager | ( | ) |
| network::EpollManager::~EpollManager | ( | ) |
|
private |
| void network::EpollManager::addHandler | ( | IEventHandler * | handler, |
| uint32_t | events ) |
| bool network::EpollManager::getisShuttingDown | ( | ) | const |
| void network::EpollManager::modifyHandler | ( | IEventHandler * | handler, |
| uint32_t | events ) |
|
private |
| void network::EpollManager::removeHandler | ( | IEventHandler const * | handler | ) |
| void network::EpollManager::requestShutdown | ( | ) |
| int network::EpollManager::waitForEvents | ( | struct epoll_event * | events, |
| int | maxEvents, | ||
| int | timeout = -1 ) |
|
private |
|
private |