VideoTools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
GNet::EventHandler Class Reference

A base class for classes that handle asynchronous events from the event loop. More...

#include <geventhandler.h>

+ Inheritance diagram for GNet::EventHandler:

Public Member Functions

virtual ~EventHandler ()
 Destructor.
 
virtual void readEvent ()
 Called for a read event. More...
 
virtual void writeEvent ()
 Called for a write event. More...
 
virtual void exceptionEvent ()
 Called for a socket-exception event. More...
 
- Public Member Functions inherited from GNet::EventExceptionHandler
virtual void onException (std::exception &)=0
 Called by the event loop when an exception is thrown out of an event loop callback. More...
 

Additional Inherited Members

- Protected Member Functions inherited from GNet::EventExceptionHandler
virtual ~EventExceptionHandler ()
 Destructor.
 

Detailed Description

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 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 EventExceptionHandler::onException() method.

Definition at line 78 of file geventhandler.h.

Member Function Documentation

void GNet::EventHandler::exceptionEvent ( )
virtual

Called for a socket-exception event.

Overridable. The default implementation throws an exception resulting in a call to GNet::EventExceptionHandler::onException().

Definition at line 46 of file geventhandler.cpp.

void GNet::EventHandler::readEvent ( )
virtual

Called for a read event.

Overridable. The default implementation does nothing.

Reimplemented in GNet::ServerPeer, GNet::SimpleClient, and GNet::Server.

Definition at line 36 of file geventhandler.cpp.

void GNet::EventHandler::writeEvent ( )
virtual

Called for a write event.

Overrideable. The default implementation does nothing.

Reimplemented in GNet::ServerPeer, GNet::SimpleClient, and GNet::Server.

Definition at line 41 of file geventhandler.cpp.


The documentation for this class was generated from the following files: