Public Member Functions
|virtual void||readEvent ()|
|Called for a read event. |
|virtual void||writeEvent ()|
|Called for a write event. |
|virtual void||exceptionEvent ()|
|Called for an exception event. |
|virtual void||onException (std::exception &)=0|
|Called when an exception is thrown out of readEvent(), writeEvent() or exceptionEvent(). |
An event handler object has its virtual methods called when an event is detected on the associated file descriptor.
If an event handler throws an exception which is caught by the event loop then the event loop calls the handler's onException() method.
|virtual void GNet::EventHandler::onException||(||std::exception &||)||
The implementation may just do a "throw" to throw the current exception out of the event loop, or a "delete this" for objects that manage themselves on the heap.
EventHandler objects or timer objects that are sub-objects of other EventHandler objects will normally have their implementation of onException() or onTimerException() delgate to the outer object's onException().