ionflux.org | Impressum

Ionflux::Tools::MessageHandler Class Reference
[Network interface]

Message event handler. More...

#include <MessageHandler.hpp>

Inheritance diagram for Ionflux::Tools::MessageHandler:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~MessageHandler ()
 Destructor.
virtual void onMessage (TCPRemotePeer &peer)=0
 Event handler for received messages.
virtual void onInvalidMessage (TCPRemotePeer &peer)=0
 Event handler for invalid messages.

Detailed Description

Message event handler.

Abstract base class for handling message events. A message event is invoked whenever a TCPRemotePeer has received and unpacked a valid network message.


Constructor & Destructor Documentation

virtual Ionflux::Tools::MessageHandler::~MessageHandler  )  [inline, virtual]
 

Destructor.

Destruct MessageDump object.


Member Function Documentation

virtual void Ionflux::Tools::MessageHandler::onInvalidMessage TCPRemotePeer peer  )  [pure virtual]
 

Event handler for invalid messages.

This is called whenever an invalid message is received from a peer.

Note:
Override this to implement your own invalid message handling.
Parameters:
peer The peer which caused the event.

Implemented in Ionflux::Tools::TCPAuthClient, Ionflux::Tools::TCPAuthServer, Ionflux::Tools::TCPMessageClient, and Ionflux::Tools::TCPMessageServer.

virtual void Ionflux::Tools::MessageHandler::onMessage TCPRemotePeer peer  )  [pure virtual]
 

Event handler for received messages.

This is called whenever a valid message is received from a peer. The received message will be available from TCPRemotePeer::getMessage().

Note:
Override this to implement your own message handling.
Parameters:
peer The peer which caused the event.

Implemented in Ionflux::Tools::TCPAuthClient, Ionflux::Tools::TCPAuthServer, Ionflux::Tools::TCPMessageClient, and Ionflux::Tools::TCPMessageServer.


The documentation for this class was generated from the following file:
Generated on Tue Mar 14 21:08:50 2006 for Ionflux Tools Class Library (iftools) by  doxygen 1.4.6