From 0a906818494814f308f1c6a0c208aa8ed76ef52a Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 7 Apr 2015 12:32:05 -0700 Subject: [PATCH] Add ping(), and a logic fix in SelfAwareness. --- node/Peer.hpp | 17 +++++++++++++++++ node/SelfAwareness.cpp | 4 +++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/node/Peer.hpp b/node/Peer.hpp index 4bea101bc..ba02bfcaa 100644 --- a/node/Peer.hpp +++ b/node/Peer.hpp @@ -182,6 +182,23 @@ public: */ void attemptToContactAt(const RuntimeEnvironment *RR,const InetAddress &atAddress,unsigned int linkDesperation,uint64_t now); + /** + * Send a HELLO to all active direct paths + * + * @param RR Runtime environment + * @param now Current time + */ + inline void ping(const RuntimeEnvironment *RR,uint64_t now) + { + unsigned int np = _numPaths; + for(unsigned int p=0;pnode->now(),(InetAddress::IpScope)scope); RR->topology->eachPeer<_ResetWithinScope &>(rset);