SOLA
|
#include <natter.h>
Public Types | |
using | NodeInfo = NodeInfoT |
Public Member Functions | |
Natter (const Natter &)=delete | |
Natter & | operator= (const Natter &other)=delete |
Natter (Natter &&)=delete | |
Natter & | operator= (Natter &&)=delete |
solanet::UUID | publish (const std::string &topic, const std::string &msg_content) |
bool | addPeer (const std::string &topic, const NodeInfo &info) |
void | subscribeTopic (const std::string &topic, const NodeInfo &info) |
bool | isSubscribedToTopic (const std::string &topic) const |
void | unsubscribeTopic (const std::string &topic) |
bool | removePeer (const std::string &topic, const std::string &ip, uint16_t port) |
solanet::UUID | getUUID () const |
NodeInfo | getOwnNodeInfo (const std::string &topic) const |
NetworkInfoIPv4 | getNetworkInfo () const |
natter instance
|
inline |
Add peer to the set which natter will use for message dissemination
topic | Topic for which this node should be used |
info | Information about other peer (specific for selected dissemination algorithm) |
|
inline |
Returns IPv4 and port of this natter instance
|
inline |
Returns the node info for a given topic of this natter instance
topic |
|
inline |
Returns UUID of this natter node
|
inline |
Checks if this natter instance is subscribed to topic
topic |
|
inline |
Publish message to a topic
topic | Topic to publish to |
msg_content | content to publish. Might be in any form. std::string acts as a container only. |
|
inline |
Remove peer from the set which natter will use to gossip with
topic | Topic to unsubscribe |
uuid | unique-id of the node to be removed |
|
inline |
Subscribe topic
so natter accept new peers on that topic
topic | topic name |
|
inline |
Remove topic
. This will remove all added peers for that topic.
topic |