27 #ifndef NIDAS_CORE_POLLED_H
28 #define NIDAS_CORE_POLLED_H
33 #define POLL_EPOLL_ET 0
34 #define POLL_EPOLL_LT 1
35 #define POLL_PSELECT 2
68 #define POLLING_METHOD POLL_EPOLL_LT
82 #define N_POLLIN POLLIN
83 #define N_POLLERR POLLERR
84 #define N_POLLHUP POLLHUP
88 #define N_POLLRDHUP POLLRDHUP
90 #define N_POLLRDHUP POLLHUP
93 #if POLLING_METHOD == POLL_PSELECT
94 #include <sys/select.h>
97 #if POLLING_METHOD == POLL_EPOLL_ET || POLLING_METHOD == POLL_EPOLL_LT
98 #include <sys/epoll.h>
101 namespace nidas {
namespace core {
113 virtual int getFd()
const = 0;
Interface for objects with a file descriptor, providing a virtual method to be called when system cal...
Definition: Polled.h:109
virtual ~Polled()
Definition: Polled.h:111
virtual bool handlePollEvents(uint32_t events)=0
virtual int getFd() const =0