Open Lighting Architecture
Latest Git
|
An implementation of PollerInterface that uses epoll().
epoll() is more efficient than select() but only newer Linux systems support it.
Public Member Functions | |
EPoller (ExportMap *export_map, Clock *clock) | |
Create a new EPoller. More... | |
bool | AddReadDescriptor (class ReadFileDescriptor *descriptor) |
Register a ReadFileDescriptor for read events. More... | |
bool | AddReadDescriptor (class ConnectedDescriptor *descriptor, bool delete_on_close) |
Register a ConnectedDescriptor for read events. More... | |
bool | RemoveReadDescriptor (class ReadFileDescriptor *descriptor) |
Unregister a ReadFileDescriptor for read events. More... | |
bool | RemoveReadDescriptor (class ConnectedDescriptor *descriptor) |
Unregister a ConnectedDescriptor for read events. More... | |
bool | AddWriteDescriptor (class WriteFileDescriptor *descriptor) |
Register a WriteFileDescriptor to receive ready-to-write events. More... | |
bool | RemoveWriteDescriptor (class WriteFileDescriptor *descriptor) |
Unregister a WriteFileDescriptor for write events. More... | |
const TimeStamp * | WakeUpTime () const |
bool | Poll (TimeoutManager *timeout_manager, const TimeInterval &poll_interval) |
Poll the Descriptors for events and execute any callbacks. More... | |
Public Member Functions inherited from ola::io::PollerInterface | |
virtual | ~PollerInterface () |
Destructor. | |
Additional Inherited Members | |
Static Public Attributes inherited from ola::io::PollerInterface | |
static const char | K_READ_DESCRIPTOR_VAR [] = "ss-read-descriptors" |
The number of descriptors registered for read events. | |
static const char | K_WRITE_DESCRIPTOR_VAR [] = "ss-write-descriptor" |
The number of descriptors registered for write events. | |
static const char | K_CONNECTED_DESCRIPTORS_VAR [] |
The number of connected descriptors registered for read events. More... | |
Static Protected Attributes inherited from ola::io::PollerInterface | |
static const char | K_LOOP_TIME [] = "ss-loop-time" |
The time spent in the event loop. | |
static const char | K_LOOP_COUNT [] = "ss-loop-count" |
The number of iterations through the event loop. | |
|
virtual |
Register a ReadFileDescriptor for read events.
descriptor | the ReadFileDescriptor to register. The OnData() method will be called when there is data available for reading. |
Implements ola::io::PollerInterface.
|
virtual |
Register a ConnectedDescriptor for read events.
descriptor | the ConnectedDescriptor to register. The OnData() method will be called when there is data available for reading. Additionally, OnClose() will be called if the other end closes the connection. |
delete_on_close | controls whether the descriptor is deleted when it's closed. |
Implements ola::io::PollerInterface.
|
virtual |
Register a WriteFileDescriptor to receive ready-to-write events.
descriptor | the WriteFileDescriptor to register. The PerformWrite() method will be called when the descriptor is ready for writing. |
Implements ola::io::PollerInterface.
|
virtual |
Poll the Descriptors for events and execute any callbacks.
timeout_manager | the TimeoutManager to use for timer events. |
poll_interval | the maximum time to block for. |
Implements ola::io::PollerInterface.
|
virtual |
Unregister a ReadFileDescriptor for read events.
descriptor | the ReadFileDescriptor to unregister. |
Implements ola::io::PollerInterface.
|
virtual |
Unregister a ConnectedDescriptor for read events.
descriptor | the ConnectedDescriptor to unregister. |
Implements ola::io::PollerInterface.
|
virtual |
Unregister a WriteFileDescriptor for write events.
descriptor | the WriteFileDescriptor to unregister. |
Implements ola::io::PollerInterface.