31 #ifndef _SYS_UTIL_POLLER_H
32 #define _SYS_UTIL_POLLER_H
68 std::map<int, int> m_polls;
69 std::map<int, int> m_events;
71 int converteflags(
int);
89 void operator=(
const Poller&) =
delete;
116 void wait(std::chrono::milliseconds t)
Poller which allows polling of generic file descriptors for various events.
void set(int, int)
Add a file desriptor to poller.
void remove(int)
Remove a file descriptor from poller.
@ priority
There is some exceptional condition on the file descriptor. E.g. There is out-of-band data on a TCP s...
@ output
File descriptor is available for write operations.
@ hup
Hang up. The local or peer connection has been closed.
@ read_hup
For stream sockets, peer connection (or local connection) has been shut down.
@ input
File descriptor is available for read operations.
void wait()
Wait forever for an event.
int event(int)
Return flags which were polled for this file descriptor.
void wait(std::chrono::milliseconds t)
Wait for a number of milliseconds for an event.