Network communication abstraction layer. More...
#include <network_layer.h>
Public Member Functions | |
virtual void | Send (const T &message)=0 |
Send a message through the network. More... | |
void | SetReceiver (void *object, std::function< void(T)> receiver) |
Set a receiver callback. More... | |
Protected Member Functions | |
void | FireReceiverCallbacks (const std::vector< uint8_t > &payload) |
Fire all the set receiver callaback. More... | |
Network communication abstraction layer.
T | Message type |
|
inlineprotected |
Fire all the set receiver callaback.
payload | Received payload |
|
pure virtual |
Send a message through the network.
message | Message to be sent |
|
inline |
Set a receiver callback.
object | Object that owns the callback |
receiver | Receiver callback to be called when a message has been received |