An implementation of PollerInterface for Windows.
|
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 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.
|
|
◆ WindowsPoller()
ola::io::WindowsPoller::WindowsPoller |
( |
ExportMap * |
export_map, |
|
|
Clock * |
clock |
|
) |
| |
◆ AddReadDescriptor() [1/2]
◆ AddReadDescriptor() [2/2]
bool ola::io::WindowsPoller::AddReadDescriptor |
( |
class ConnectedDescriptor * |
descriptor, |
|
|
bool |
delete_on_close |
|
) |
| |
|
virtual |
Register a ConnectedDescriptor for read events.
- Parameters
-
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. |
- Returns
- true if the descriptor was registered, false otherwise.
Implements ola::io::PollerInterface.
◆ AddWriteDescriptor()
◆ Poll()
Poll the Descriptors for events and execute any callbacks.
- Parameters
-
timeout_manager | the TimeoutManager to use for timer events. |
poll_interval | the maximum time to block for. |
- Returns
- false if any errors occurred, true if events were handled.
Implements ola::io::PollerInterface.
◆ RemoveReadDescriptor() [1/2]
bool ola::io::WindowsPoller::RemoveReadDescriptor |
( |
class ReadFileDescriptor * |
descriptor | ) |
|
|
virtual |
Unregister a ReadFileDescriptor for read events.
- Parameters
-
- Returns
- true if unregistered successfully, false otherwise.
- Precondition
- descriptor->ReadFileDescriptor() is valid.
Implements ola::io::PollerInterface.
◆ RemoveReadDescriptor() [2/2]
◆ RemoveWriteDescriptor()
The documentation for this class was generated from the following files: