Kyoto Tycoon
|
I/O event notification. More...
#include <ktsocket.h>
Public Member Functions | |
Poller () | |
Default constructor. | |
~Poller () | |
Destructor. | |
const char * | error () |
Get the last happened error information. | |
bool | open () |
Open the poller. | |
bool | close () |
Close the poller. | |
bool | deposit (Pollable *event) |
Add a pollable I/O event to the monitored list. | |
bool | withdraw (Pollable *event) |
Remove a pollable I/O from the monitored list. | |
Pollable * | next () |
Fetch the next notified I/O event. | |
bool | undo (Pollable *event) |
Enable the next notification of a pollable event. | |
bool | wait (double timeout=-1) |
Wait one or more notifying events. | |
bool | flush () |
Notify all registered events. | |
int64_t | count () |
Get the number of events to watch. | |
bool | abort () |
Abort the current operation. |
I/O event notification.
kyototycoon::Poller::Poller | ( | ) | [explicit] |
Default constructor.
Destructor.
const char* kyototycoon::Poller::error | ( | ) |
Get the last happened error information.
bool kyototycoon::Poller::open | ( | ) |
Open the poller.
bool kyototycoon::Poller::close | ( | ) |
Close the poller.
bool kyototycoon::Poller::deposit | ( | Pollable * | event | ) |
Add a pollable I/O event to the monitored list.
event | the pollable event object. |
bool kyototycoon::Poller::withdraw | ( | Pollable * | event | ) |
Remove a pollable I/O from the monitored list.
event | the pollable event object. |
Fetch the next notified I/O event.
bool kyototycoon::Poller::undo | ( | Pollable * | event | ) |
Enable the next notification of a pollable event.
event | the pollable event object. |
bool kyototycoon::Poller::wait | ( | double | timeout = -1 | ) |
Wait one or more notifying events.
timeout | the timeout in seconds. If it is not more than 0, no timeout is specified. |
bool kyototycoon::Poller::flush | ( | ) |
Notify all registered events.
int64_t kyototycoon::Poller::count | ( | ) |
Get the number of events to watch.
bool kyototycoon::Poller::abort | ( | ) |
Abort the current operation.