|
rippled
|


Public Member Functions | |
| PeerSetImpl (Application &app) | |
| void | addPeers (std::size_t limit, std::function< bool(std::shared_ptr< Peer > const &)> hasItem, std::function< void(std::shared_ptr< Peer > const &)> onPeerAdded) override |
| Try add more peers. | |
| void | sendRequest (::google::protobuf::Message const &message, protocol::MessageType type, std::shared_ptr< Peer > const &peer) override |
| Send a message to one or all peers. | |
| std::set< Peer::id_t > const & | getPeerIds () const override |
| get the set of ids of previously added peers | |
| template<typename MessageType > | |
| void | sendRequest (MessageType const &message, std::shared_ptr< Peer > const &peer) |
| send a message | |
Private Attributes | |
| Application & | app_ |
| beast::Journal | journal_ |
| std::set< Peer::id_t > | peers_ |
| The identifiers of the peers we are tracking. | |
Definition at line 27 of file PeerSet.cpp.
| ripple::PeerSetImpl::PeerSetImpl | ( | Application & | app | ) |
Definition at line 58 of file PeerSet.cpp.
|
overridevirtual |
Try add more peers.
| limit | number of peers to add |
| hasItem | callback that helps to select peers |
| onPeerAdded | callback called when a peer is added |
Implements ripple::PeerSet.
Definition at line 64 of file PeerSet.cpp.
|
overridevirtual |
Send a message to one or all peers.
Implements ripple::PeerSet.
Definition at line 101 of file PeerSet.cpp.
|
overridevirtual |
get the set of ids of previously added peers
Implements ripple::PeerSet.
Definition at line 121 of file PeerSet.cpp.
|
inherited |
|
private |
Definition at line 51 of file PeerSet.cpp.
|
private |
Definition at line 52 of file PeerSet.cpp.
|
private |
The identifiers of the peers we are tracking.
Definition at line 55 of file PeerSet.cpp.