Fawkes API
Fawkes Development Version
|
Gossip group communication handler. More...
#include <>>
Public Member Functions | |
~GossipGroup () | |
Destructor. More... | |
void | send (std::string &peer, google::protobuf::Message &m) |
Send a message. More... | |
void | broadcast (google::protobuf::Message &m) |
Broadcast a message to all peers in the group. More... | |
protobuf_comm::MessageRegister & | message_register () |
Get the protobuf message register. More... | |
boost::signals2::signal< void(boost::asio::ip::udp::endpoint &, uint16_t, uint16_t, std::shared_ptr< google::protobuf::Message >)> & | signal_received () |
Signal that is invoked when a message has been received. More... | |
boost::signals2::signal< void(boost::asio::ip::udp::endpoint &, std::string)> & | signal_recv_error () |
Signal that is invoked when receiving a message failed. More... | |
boost::signals2::signal< void(std::string)> & | signal_send_error () |
Signal that is invoked when sending a message failed. More... | |
const std::string & | name () const |
Get group name. More... | |
std::shared_ptr< protobuf_comm::ProtobufBroadcastPeer > | peer () const |
Get Protobuf broadcast peer. More... | |
Friends | |
class | GossipGroupManager |
Gossip group communication handler.
The group communication handler cares about joining groups and sending and receiving data.
Definition at line 46 of file gossip_group.h.
fawkes::GossipGroup::~GossipGroup | ( | ) |
Destructor.
Definition at line 106 of file gossip_group.cpp.
void fawkes::GossipGroup::broadcast | ( | google::protobuf::Message & | m | ) |
Broadcast a message to all peers in the group.
m | message to send |
Definition at line 130 of file gossip_group.cpp.
|
inline |
Get the protobuf message register.
Definition at line 60 of file gossip_group.h.
|
inline |
|
inline |
Get Protobuf broadcast peer.
Definition at line 88 of file gossip_group.h.
void fawkes::GossipGroup::send | ( | std::string & | peer, |
google::protobuf::Message & | m | ||
) |
Send a message.
peer | peer to send message to |
m | message to send |
Definition at line 119 of file gossip_group.cpp.
|
inline |
Signal that is invoked when a message has been received.
Definition at line 67 of file gossip_group.h.
|
inline |
Signal that is invoked when receiving a message failed.
Definition at line 73 of file gossip_group.h.
|
inline |
Signal that is invoked when sending a message failed.
Definition at line 79 of file gossip_group.h.