21 #ifndef COMMON_IO_EPOLLER_H_
22 #define COMMON_IO_EPOLLER_H_
25 #include <ola/Clock.h>
28 #include <sys/epoll.h>
36 #include "common/io/PollerInterface.h"
37 #include "common/io/TimeoutManager.h"
64 bool delete_on_close);
71 const TimeStamp *WakeUpTime()
const {
return &m_wake_up_time; }
77 typedef std::map<int, EPollData*> DescriptorMap;
78 typedef std::vector<EPollData*> DescriptorList;
80 DescriptorMap m_descriptor_map;
86 DescriptorList m_orphaned_descriptors;
88 DescriptorList m_free_descriptors;
96 std::pair<EPollData*, bool> LookupOrCreateDescriptor(
int fd);
98 bool RemoveDescriptor(
int fd,
int event,
bool warn_on_missing);
99 void CheckDescriptor(
struct epoll_event *event,
EPollData *descriptor);
101 static const int MAX_EVENTS;
102 static const int READ_FLAGS;
103 static const unsigned int MAX_FREE_DESCRIPTORS;
105 DISALLOW_COPY_AND_ASSIGN(
EPoller);
109 #endif // COMMON_IO_EPOLLER_H_