12 #ifndef _EventHandler_h
13 #define _EventHandler_h
240 #endif // _EventHandler_h
Mask that includes all events.
void set_id(const std::string &id_)
Set EventHandler ID.
bool isSignalEvent(EventType e_)
virtual int handle_close(int fd)
EOF on peer socket handler callback.
virtual int handle_write(int fd)
Write handler callback.
Notify about expired timer.
bool isExceptEvent(EventType e_)
EventHandler()
Constructor.
bool isRWEEvents(EventType e_)
READ_EVENT | WRITE_EVENT | EXCEPT_EVENT.
#define trace_with_mask(s, m)
trace_with_mask() is used to trace function call chain in C++ program.
A collection of assert function wrappers.
virtual int handle_signal(int signum_)
Signal handler callback.
Notify when UNIX signal is delivered by OS.
bool isAllEvents(EventType e_)
bool isTimeoutEvent(EventType e_)
virtual int handle_read(int fd)
Read event callback.
virtual ~EventHandler()
Virtual destructor.
Extended Reactor/PrioriyQueue messages.
Notify when there will be room for at least 1 byte to be written to IO channel without blocking...
bool isWriteEvent(EventType e_)
virtual int handle_except(int fd)
Exception handler callback.
int(EventHandler::* EH_IO_Callback)(int)
A type for the pointer to I/O-related callback member function of class EventHandler.
bool isReadEvent(EventType e_)
unsigned long TimerId
Timer Id is used in handle_timeout() calls.
virtual void resetState(void)
A hook for derived class to reset internal state as needed.
Notify when there is an exception condition detected in TCP layer.
virtual int handle_timeout(TimerId tid)
Timeout handler callback.
EventType
EventType defines events types that Reactor understands.
Notify when there will be at least 1 byte available for reading from IO channel without blocking ...
std::string get_id() const
Retrieve EventHandler ID.