#include <IOMultiplexer.hpp>
Inheritance diagram for Ionflux::Tools::IOMultiplexer:
Public Member Functions | |
IOMultiplexer () | |
Constructor. | |
virtual | ~IOMultiplexer () |
Destructor. | |
virtual void | registerEvent (IOHandler *handler, IOEvent event)=0 |
Register IO event. | |
virtual void | removeEvent (IOHandler *handler, IOEvent event)=0 |
Remove IO event. | |
virtual void | run ()=0 |
Main loop. | |
virtual void | quit ()=0 |
Exit main loop. | |
virtual bool | isRunning ()=0 |
Get running state. | |
virtual int | getType () |
Get type. | |
virtual Reporter & | getLog ()=0 |
Get Console output/logging facility. | |
Static Public Member Functions | |
static void | shutdownHandler (int signum) |
Shutdown handler. | |
Static Public Attributes | |
static const int | IOM_TYPE_UNDEFINED = 0 |
IO multiplexer type ID: Undefined. | |
static const int | IOM_TYPE_SELECT = 1 |
IO multiplexer type ID: Select multiplexer. | |
static const int | IOM_TYPE_GLIB = 2 |
IO multiplexer type ID: Glib multiplexer. | |
Protected Attributes | |
int | type |
IO multiplexer type ID. |
A multiplexer for IO events. If a specified event is ready to be processed, the IO multiplexer notifies the associated IO handler. For example, an IOHandler may be called if a file descriptor is ready for reading.
To register an event, you set a file descriptor and a mask of event types which the IO handler should be notified of. You then call IOMultiplexer::registerEvent() with a pointer to an IOHandler and the event object. To remove (unregister) an event, call IOMultiplexer::removeEvent() with the same handler and event object.
|
Constructor. Construct new IOMultiplexer object. |
|
Destructor. Destruct IOMultiplexer object. |
|
Get Console output/logging facility.
Implemented in Ionflux::Tools::GlibMultiplexer, and Ionflux::Tools::SelectMultiplexer. |
|
Get type. Returns the IO multiplexer type ID.
|
|
Get running state.
Implemented in Ionflux::Tools::GlibMultiplexer, and Ionflux::Tools::SelectMultiplexer. |
|
Exit main loop. Call this function to exit from the main loop. Implemented in Ionflux::Tools::GlibMultiplexer, and Ionflux::Tools::SelectMultiplexer. |
|
Register IO event. Register an IO event to be handled by the multiplexer.
Implemented in Ionflux::Tools::GlibMultiplexer, and Ionflux::Tools::SelectMultiplexer. |
|
Remove IO event. Remove an IO event from the set of events handled by the multiplexer.
Implemented in Ionflux::Tools::GlibMultiplexer, and Ionflux::Tools::SelectMultiplexer. |
|
Main loop. Start the main loop to watch for registered events. Implemented in Ionflux::Tools::GlibMultiplexer, and Ionflux::Tools::SelectMultiplexer. |
|
Shutdown handler. Signal handler for signals that will cause the main loop to exit.
Reimplemented in Ionflux::Tools::GlibMultiplexer, and Ionflux::Tools::SelectMultiplexer. |
|
IO multiplexer type ID: Glib multiplexer.
|
|
IO multiplexer type ID: Select multiplexer.
|
|
IO multiplexer type ID: Undefined.
|
|
IO multiplexer type ID.
|