E-MailRelay
|
A base class for classes that handle asynchronous events from the event loop. More...
#include <geventhandler.h>
Public Types | |
enum class | Reason { closed , down , reset , abort , other } |
Public Member Functions | |
virtual | ~EventHandler ()=default |
Destructor. | |
virtual void | readEvent () |
Called for a read event. More... | |
virtual void | writeEvent () |
Called for a write event. More... | |
virtual void | otherEvent (Reason) |
Called for a socket-exception event, or a socket-close event on windows. More... | |
Static Public Member Functions | |
static std::string | str (Reason) |
Returns a printable description of the other-event reason. More... | |
A base class for classes that handle asynchronous events from the event loop.
An event handler object has its virtual methods called when an event is detected on the relevant file descriptor.
The EventHandlerList class ensures that if an exception is thrown out of an event handler it is caught and delivered to an associated ExceptionHandler interface (if any).
Definition at line 47 of file geventhandler.h.
|
strong |
Definition at line 50 of file geventhandler.h.
|
virtual |
Called for a socket-exception event, or a socket-close event on windows.
Overridable. The default implementation throws an exception.
Definition at line 36 of file geventhandler.cpp.
|
virtual |
Called for a read event.
Overridable. The default implementation does nothing.
Definition at line 26 of file geventhandler.cpp.
|
static |
Returns a printable description of the other-event reason.
Definition at line 46 of file geventhandler.cpp.
|
virtual |
Called for a write event.
Overrideable. The default implementation does nothing.
Definition at line 31 of file geventhandler.cpp.