m2etis
0.4
|
Generic interface for the callback-class used for the network. More...
#include <NetworkCallbackInterface.h>
Public Member Functions | |
NetworkCallbackInterface () | |
virtual | ~NetworkCallbackInterface () |
virtual bool | forward (typename message::NetworkMessage< NetworkType >::Ptr message, const typename NodeHandle< NetworkType >::Ptr hint)=0 |
called if a message is forwarded by your node More... | |
virtual void | deliver (typename message::NetworkMessage< NetworkType >::Ptr message)=0 |
called if a message is delivered to your node. More... | |
virtual void | update (const typename NetworkType::Key &key, const typename NodeHandle< NetworkType >::Ptr_const handle, bool joined)=0 |
called on node joins or leaves More... | |
Generic interface for the callback-class used for the network.
Implement this class and pass it to KBR_API (or directly to the used wrapper). The callbacks will be called to inform you about actual network stuff and permit you to make own decisions.
Definition at line 43 of file NetworkCallbackInterface.h.
|
inline |
Definition at line 45 of file NetworkCallbackInterface.h.
|
inlinevirtual |
Definition at line 46 of file NetworkCallbackInterface.h.
|
pure virtual |
called if a message is delivered to your node.
[in] | message | the message |
Implemented in m2etis::net::NetworkController< NetworkType >, m2etis::net::NetworkController< m2etis::net::NetworkType< clockTCP > >, m2etis::net::NetworkController< m2etis::net::NetworkType< TCP > >, and m2etis::net::NetworkController< m2etis::net::NetworkType< UDP > >.
|
pure virtual |
called if a message is forwarded by your node
details you can change the Key, the Message and the next routing hint. If you want to stop routing simply set hint to 0. Or you can change the key and the message. Like in scribe, when building a multicast tree. It's like NAT, change the Key and the Message :-)
[in] | message | the message |
[in] | hint | the next routing hop |
Implemented in m2etis::net::NetworkController< NetworkType >, m2etis::net::NetworkController< m2etis::net::NetworkType< clockTCP > >, m2etis::net::NetworkController< m2etis::net::NetworkType< TCP > >, and m2etis::net::NetworkController< m2etis::net::NetworkType< UDP > >.
|
pure virtual |
called on node joins or leaves
[in] | key | the node's key |
[in] | handle | the node's handle |
[in] | joined | true if joined |
Implemented in m2etis::net::NetworkController< NetworkType >, m2etis::net::NetworkController< m2etis::net::NetworkType< clockTCP > >, m2etis::net::NetworkController< m2etis::net::NetworkType< TCP > >, and m2etis::net::NetworkController< m2etis::net::NetworkType< UDP > >.