summaryrefslogtreecommitdiff
path: root/node/Peer.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-11-06 14:37:17 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-11-06 14:37:17 -0800
commit5f39d5b7ea202ca39cef46779b5406e35e0dcb3e (patch)
tree55ab5bce49ab997afd65e9057b040eb3dcad4e12 /node/Peer.cpp
parent9490b1f13696d6719c61453a9d2013a315da4dd1 (diff)
downloadinfinitytier-5f39d5b7ea202ca39cef46779b5406e35e0dcb3e.tar.gz
infinitytier-5f39d5b7ea202ca39cef46779b5406e35e0dcb3e.zip
Further pare down Cluster messaging and rename some stuff.
Diffstat (limited to 'node/Peer.cpp')
-rw-r--r--node/Peer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/node/Peer.cpp b/node/Peer.cpp
index 0b981c8e..d3394da6 100644
--- a/node/Peer.cpp
+++ b/node/Peer.cpp
@@ -188,7 +188,7 @@ void Peer::received(
if ((now - _lastPathConfirmationSent) >= ZT_MIN_PATH_CONFIRMATION_INTERVAL) {
_lastPathConfirmationSent = now;
TRACE("got %s via unknown path %s(%s), confirming...",Packet::verbString(verb),_id.address().toString().c_str(),remoteAddr.toString().c_str());
- attemptToContactAt(RR,localAddr,remoteAddr,now);
+ sendHELLO(RR,localAddr,remoteAddr,now);
}
}
@@ -198,7 +198,7 @@ void Peer::received(
#ifdef ZT_ENABLE_CLUSTER
if ((RR->cluster)&&(pathIsConfirmed))
- RR->cluster->replicateHavePeer(_id,remoteAddr);
+ RR->cluster->replicateHavePeer(_id);
#endif
if (needMulticastGroupAnnounce) {
@@ -208,7 +208,7 @@ void Peer::received(
}
}
-void Peer::attemptToContactAt(const RuntimeEnvironment *RR,const InetAddress &localAddr,const InetAddress &atAddress,uint64_t now)
+void Peer::sendHELLO(const RuntimeEnvironment *RR,const InetAddress &localAddr,const InetAddress &atAddress,uint64_t now)
{
// _lock not required here since _id is immutable and nothing else is accessed
@@ -242,7 +242,7 @@ bool Peer::doPingAndKeepalive(const RuntimeEnvironment *RR,uint64_t now,int inet
if (p) {
if ((now - p->lastReceived()) >= ZT_PEER_DIRECT_PING_DELAY) {
//TRACE("PING %s(%s) after %llums/%llums send/receive inactivity",_id.address().toString().c_str(),p->address().toString().c_str(),now - p->lastSend(),now - p->lastReceived());
- attemptToContactAt(RR,p->localAddress(),p->address(),now);
+ sendHELLO(RR,p->localAddress(),p->address(),now);
p->sent(now);
} else if (((now - p->lastSend()) >= ZT_NAT_KEEPALIVE_DELAY)&&(!p->reliable())) {
//TRACE("NAT keepalive %s(%s) after %llums/%llums send/receive inactivity",_id.address().toString().c_str(),p->address().toString().c_str(),now - p->lastSend(),now - p->lastReceived());
@@ -348,7 +348,7 @@ bool Peer::resetWithinScope(const RuntimeEnvironment *RR,InetAddress::IpScope sc
unsigned int y = 0;
while (x < np) {
if (_paths[x].address().ipScope() == scope) {
- attemptToContactAt(RR,_paths[x].localAddress(),_paths[x].address(),now);
+ sendHELLO(RR,_paths[x].localAddress(),_paths[x].address(),now);
} else {
_paths[y++] = _paths[x];
}