mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Reformatting using AStyle
This commit is contained in:
@@ -12,64 +12,64 @@ public:
|
||||
|
||||
virtual ~IPeers () { }
|
||||
|
||||
// Begin enforcing connection policy.
|
||||
virtual void start () = 0;
|
||||
// Begin enforcing connection policy.
|
||||
virtual void start () = 0;
|
||||
|
||||
// Send message to network.
|
||||
virtual int relayMessage(Peer* fromPeer, const PackedMessage::pointer& msg) = 0;
|
||||
virtual void relayMessageTo(const std::set<uint64>& fromPeers, const PackedMessage::pointer& msg) = 0;
|
||||
virtual void relayMessageBut(const std::set<uint64>& fromPeers, const PackedMessage::pointer& msg) = 0;
|
||||
// Send message to network.
|
||||
virtual int relayMessage (Peer* fromPeer, const PackedMessage::pointer& msg) = 0;
|
||||
virtual void relayMessageTo (const std::set<uint64>& fromPeers, const PackedMessage::pointer& msg) = 0;
|
||||
virtual void relayMessageBut (const std::set<uint64>& fromPeers, const PackedMessage::pointer& msg) = 0;
|
||||
|
||||
// Manual connection request.
|
||||
// Queue for immediate scanning.
|
||||
virtual void connectTo(const std::string& strIp, int iPort) = 0;
|
||||
// Manual connection request.
|
||||
// Queue for immediate scanning.
|
||||
virtual void connectTo (const std::string& strIp, int iPort) = 0;
|
||||
|
||||
//
|
||||
// Peer connectivity notification.
|
||||
//
|
||||
virtual bool getTopNAddrs(int n,std::vector<std::string>& addrs) = 0;
|
||||
virtual bool savePeer(const std::string& strIp, int iPort, char code) = 0;
|
||||
//
|
||||
// Peer connectivity notification.
|
||||
//
|
||||
virtual bool getTopNAddrs (int n, std::vector<std::string>& addrs) = 0;
|
||||
virtual bool savePeer (const std::string& strIp, int iPort, char code) = 0;
|
||||
|
||||
// We know peers node public key.
|
||||
// <-- bool: false=reject
|
||||
virtual bool peerConnected(Peer::ref peer, const RippleAddress& naPeer, const std::string& strIP, int iPort) = 0;
|
||||
// We know peers node public key.
|
||||
// <-- bool: false=reject
|
||||
virtual bool peerConnected (Peer::ref peer, const RippleAddress& naPeer, const std::string& strIP, int iPort) = 0;
|
||||
|
||||
// No longer connected.
|
||||
virtual void peerDisconnected(Peer::ref peer, const RippleAddress& naPeer) = 0;
|
||||
// No longer connected.
|
||||
virtual void peerDisconnected (Peer::ref peer, const RippleAddress& naPeer) = 0;
|
||||
|
||||
// As client accepted.
|
||||
virtual void peerVerified(Peer::ref peer) = 0;
|
||||
// As client accepted.
|
||||
virtual void peerVerified (Peer::ref peer) = 0;
|
||||
|
||||
// As client failed connect and be accepted.
|
||||
virtual void peerClosed(Peer::ref peer, const std::string& strIp, int iPort) = 0;
|
||||
// As client failed connect and be accepted.
|
||||
virtual void peerClosed (Peer::ref peer, const std::string& strIp, int iPort) = 0;
|
||||
|
||||
virtual int getPeerCount() = 0;
|
||||
virtual Json::Value getPeersJson() = 0;
|
||||
virtual std::vector<Peer::pointer> getPeerVector() = 0;
|
||||
virtual int getPeerCount () = 0;
|
||||
virtual Json::Value getPeersJson () = 0;
|
||||
virtual std::vector<Peer::pointer> getPeerVector () = 0;
|
||||
|
||||
// Peer 64-bit ID function
|
||||
virtual uint64 assignPeerId() = 0;
|
||||
virtual Peer::pointer getPeerById(const uint64& id) = 0;
|
||||
virtual bool hasPeer(const uint64& id) = 0;
|
||||
// Peer 64-bit ID function
|
||||
virtual uint64 assignPeerId () = 0;
|
||||
virtual Peer::pointer getPeerById (const uint64& id) = 0;
|
||||
virtual bool hasPeer (const uint64& id) = 0;
|
||||
|
||||
//
|
||||
// Scanning
|
||||
//
|
||||
//
|
||||
// Scanning
|
||||
//
|
||||
|
||||
virtual void scanRefresh() = 0;
|
||||
virtual void scanRefresh () = 0;
|
||||
|
||||
//
|
||||
// Connection policy
|
||||
//
|
||||
virtual void policyLowWater() = 0;
|
||||
virtual void policyEnforce() = 0; // VFALCO This and others can be made private
|
||||
//
|
||||
// Connection policy
|
||||
//
|
||||
virtual void policyLowWater () = 0;
|
||||
virtual void policyEnforce () = 0; // VFALCO This and others can be made private
|
||||
|
||||
// configured connections
|
||||
virtual void makeConfigured() = 0;
|
||||
// configured connections
|
||||
virtual void makeConfigured () = 0;
|
||||
};
|
||||
|
||||
// VFALCO TODO Put this in some group of utilities
|
||||
extern void splitIpPort(const std::string& strIpPort, std::string& strIp, int& iPort);
|
||||
extern void splitIpPort (const std::string& strIpPort, std::string& strIp, int& iPort);
|
||||
|
||||
#endif
|
||||
// vim:ts=4
|
||||
|
||||
Reference in New Issue
Block a user