Go to the documentation of this file.
12 #ifndef _EventHandler_h
13 #define _EventHandler_h
240 #endif // _EventHandler_h
bool isReadEvent(EventType e_)
virtual ~EventHandler()
Virtual destructor.
std::string get_id() const
Retrieve EventHandler ID.
@ READ_EVENT
Notify when there will be at least 1 byte available for reading from IO channel without blocking .
virtual int handle_close(int fd)
EOF on peer socket handler callback.
bool isRWEEvents(EventType e_)
@ ALL_EVENTS
Mask that includes all events.
bool isExceptEvent(EventType e_)
virtual int handle_signal(int signum_)
Signal handler callback.
int(EventHandler::* EH_IO_Callback)(int)
@ TIMEOUT_EVENT
Notify about expired timer.
virtual int handle_except(int fd)
Exception handler callback.
bool isSignalEvent(EventType e_)
@ WRITE_EVENT
Notify when there will be room for at least 1 byte to be written to IO channel without blocking.
virtual int handle_read(int fd)
Read event callback.
virtual int handle_timeout(TimerId tid)
Timeout handler callback.
virtual void resetState(void)
A hook for derived class to reset internal state as needed.
void set_id(const std::string &id_)
Set EventHandler ID.
@ EXCEPT_EVENT
Notify when there is an exception condition detected in TCP layer.
@ RWE_EVENTS
READ_EVENT | WRITE_EVENT | EXCEPT_EVENT
bool isTimeoutEvent(EventType e_)
bool isAllEvents(EventType e_)
@ SIGNAL_EVENT
Notify when UNIX signal is delivered by OS.
@ REACTTRACE
Extended Reactor/PrioriyQueue messages
virtual int handle_write(int fd)
Write handler callback.
bool isWriteEvent(EventType e_)
EventHandler()
Constructor.
#define trace_with_mask(s, m)