Work in progress...

This commit is contained in:
Adam Ierymenko 2013-07-11 18:15:51 -04:00
parent ae93c95151
commit fd2b383c3e
4 changed files with 307 additions and 262 deletions

View file

@ -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
@ -213,6 +212,24 @@ public:
return 0;
}
/**
* @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
*/