summaryrefslogtreecommitdiff
path: root/node/Peer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/Peer.hpp')
-rw-r--r--node/Peer.hpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/node/Peer.hpp b/node/Peer.hpp
index ef33d519..51527148 100644
--- a/node/Peer.hpp
+++ b/node/Peer.hpp
@@ -113,12 +113,11 @@ public:
* @param _r Runtime environment
* @param localPort Local port on which packet was received
* @param fromAddr Internet address of sender
- * @param latency Latency or 0 if unknown
* @param hops ZeroTier (not IP) hops
* @param verb Packet verb
* @param now Current time
*/
- void onReceive(const RuntimeEnvironment *_r,Demarc::Port localPort,const InetAddress &fromAddr,unsigned int latency,unsigned int hops,Packet::Verb verb,uint64_t now);
+ void onReceive(const RuntimeEnvironment *_r,Demarc::Port localPort,const InetAddress &fromAddr,unsigned int hops,Packet::Verb verb,uint64_t now);
/**
* Send a UDP packet to this peer
@@ -214,6 +213,24 @@ public:
}
/**
+ * @param latency measurment for IPv4 path
+ */
+ void setV4Latency(unsigned int latency)
+ {
+ _ipv4p.latency = latency;
+ _dirty = true;
+ }
+
+ /**
+ * @param latency Latency measurment for IPv6 path
+ */
+ void setV6Latency(unsigned int latency)
+ {
+ _ipv6p.latency = latency;
+ _dirty = true;
+ }
+
+ /**
* @return True if this peer has at least one direct IP address path
*/
inline bool hasDirectPath() const