ConnectionManagerMessageHookInterface¶
-
class
kanzi::connect
::
ConnectionManagerMessageHookInterface
¶ Interface that can hook incoming messages.
Can be installed to intercept all incoming messages before they are processed in any way
Subclassed by ConnectionManager
Public Types
Public 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.
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.
- Parameters
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.
- Returns
optional message package that shall overwrite the existing one.
-
virtual optional<MessagePackage>