#include <MNSelector.h>
Inheritance diagram for MNSelector:
Public Member Functions | |
MNSelector (bool notifiable) | |
virtual | ~MNSelector () |
void | select () |
void | insert (MNSocketBase *socketptr, bool threaded, const char *caller, u_int32_t set=MNSelector::READSET) |
void | remove_fd (int fd, u_int32_t set=MNSelector::BOTHSETS) |
void | remove_fd (MNSocketBase *socketptr) |
bool | insert_abs_timer (void *data, TimerCallBase *timerptr, const struct timeval &timeout, const char *owner) |
bool | insert_rel_timer (void *data, TimerCallBase *timerptr, const struct timeval &timeout, const char *owner) |
bool | insert_periodic_timer (void *data, TimerCallBase *timerptr, const struct timeval &timeout, const char *owner) |
bool | cancel_timer (TimerCallBase *timerptr) |
void | cancel_all_timers () |
void | wakeup () |
bool | notifiable () const |
Static Public Attributes | |
const bool | DontWakeup = false |
only to increase readability of caller of insert() | |
const bool | Wakeup = true |
only to increase readability of caller of insert() | |
const u_int32_t | READSET = 0 |
Constants. | |
const u_int32_t | WRITESET = 1 |
const u_int32_t | BOTHSETS = 2 |
|
Each selector may implement an internal pipe that allows it to be waken up for an arbitrary reason. Such reasons may be the insertion of a new socket, a clean deletion of a class that has a socket registered at this selector, or somesuch. The external notifier classes make sense in specialized cases, but if the selector is shared by many sockets, it is cheaper to integrated the pipe.
|
|
|
|
|
|
|
|
Use this function to insert a new file descriptor struct into the selector for observation. Some of the socket classes include this call in their constructor, for others it must be called manually. Look there.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Send a byte to the notification pipe and wake the selector up for some arbitrary processing. If the selector has been created with this capability, this results in an assertion. |
|
|
|
only to increase readability of caller of insert()
|
|
Constants.
|
|
only to increase readability of caller of insert()
|
|
|