A concrete implementation of GNet::EventLoop using select() in the implementation. More...
Public Member Functions | |
| Select () | |
| virtual | ~Select () |
| virtual bool | init () |
| Initialises the object. More... | |
| virtual std::string | run () |
| Runs the main event loop. More... | |
| virtual bool | running () const |
| Returns true if called from within run(). More... | |
| virtual void | quit (std::string) |
| Causes run() to return (once the call stack has unwound). More... | |
| virtual void | addRead (Descriptor fd, EventHandler &handler) |
| Adds the given event source descriptor and associated handler to the read list. More... | |
| virtual void | addWrite (Descriptor fd, EventHandler &handler) |
| Adds the given event source descriptor and associated handler to the write list. More... | |
| virtual void | addException (Descriptor fd, EventHandler &handler) |
| Adds the given event source descriptor and associated handler to the exception list. More... | |
| virtual void | dropRead (Descriptor fd) |
| Removes the given event source descriptor from the list of read sources. More... | |
| virtual void | dropWrite (Descriptor fd) |
| Removes the given event source descriptor from the list of write sources. More... | |
| virtual void | dropException (Descriptor fd) |
| Removes the given event source descriptor from the list of exception sources. More... | |
Public Member Functions inherited from GNet::EventLoop | |
| virtual | ~EventLoop () |
| Destructor. More... | |
Public Member Functions inherited from G::noncopyable | |
| noncopyable () | |
Additional Inherited Members | |
Static Public Member Functions inherited from GNet::EventLoop | |
| static EventLoop * | create () |
| A factory method which creates an instance of a derived class on the heap. More... | |
| static EventLoop & | instance () |
| Returns a reference to an instance of the class, if any. More... | |
| static bool | exists () |
| Returns true if an instance exists. More... | |
Protected Member Functions inherited from GNet::EventLoop | |
| EventLoop () | |
| Constructor. More... | |
A concrete implementation of GNet::EventLoop using select() in the implementation.
Definition at line 67 of file geventloop_unix.cpp.
| GNet::Select::Select | ( | ) |
Definition at line 212 of file geventloop_unix.cpp.
|
virtual |
Definition at line 221 of file geventloop_unix.cpp.
|
virtual |
Adds the given event source descriptor and associated handler to the exception list.
See also Socket::addExceptionHandler().
Implements GNet::EventLoop.
Definition at line 317 of file geventloop_unix.cpp.
|
virtual |
Adds the given event source descriptor and associated handler to the read list.
See also Socket::addReadHandler().
Implements GNet::EventLoop.
Definition at line 305 of file geventloop_unix.cpp.
|
virtual |
Adds the given event source descriptor and associated handler to the write list.
See also Socket::addWriteHandler().
Implements GNet::EventLoop.
Definition at line 311 of file geventloop_unix.cpp.
|
virtual |
Removes the given event source descriptor from the list of exception sources.
See also Socket::dropExceptionHandler().
Implements GNet::EventLoop.
Definition at line 335 of file geventloop_unix.cpp.
|
virtual |
Removes the given event source descriptor from the list of read sources.
See also Socket::dropReadHandler().
Implements GNet::EventLoop.
Definition at line 323 of file geventloop_unix.cpp.
|
virtual |
Removes the given event source descriptor from the list of write sources.
See also Socket::dropWriteHandler().
Implements GNet::EventLoop.
Definition at line 329 of file geventloop_unix.cpp.
|
virtual |
Initialises the object.
Implements GNet::EventLoop.
Definition at line 225 of file geventloop_unix.cpp.
|
virtual |
Causes run() to return (once the call stack has unwound).
If there are multiple quit()s before run() returns then the latest reason is used.
Implements GNet::EventLoop.
Definition at line 248 of file geventloop_unix.cpp.
|
virtual |
Runs the main event loop.
Returns a quit() reason, if any.
Implements GNet::EventLoop.
Definition at line 230 of file geventloop_unix.cpp.
|
virtual |
Returns true if called from within run().
Implements GNet::EventLoop.
Definition at line 243 of file geventloop_unix.cpp.
1.8.9.1