Interface that can hook incoming messages. More...
#include <connection_manager.hpp>
Public Types | |
enum | MessageDirection { Incoming , Outgoing } |
Public Member Functions | |
virtual optional< MessagePackage > | messageHook (MessageDirection direction, int clientId, const MessagePackage &oldPackage)=0 |
Called for each and every incoming/outgoing message before it gets processed by any away. | |
Interface that can hook incoming messages.
Can be installed to intercept all incoming messages before they are processed in any way
|
pure virtual |
Called for each and every incoming/outgoing message before it gets processed by any away.
This is a very low level handler should be very fast to execute in order not to affect whole system performance. It is essential not to cache any of the passed parameters by reference/pointer.
direction | specifier whether message is incoming or outgoing. |
clientId | identifies the connected client that sent the message. |
oldPackage | this is the original package that is to be processed. |