diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-10-27 14:04:12 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-10-27 14:04:12 -0700 |
commit | f692cec763d67caae54a4f47446657c390563319 (patch) | |
tree | 9cce78979ceb2fd2c3d8a43464883c5331f84c7a /node/Switch.hpp | |
parent | 40e0a34a5c22276e5546dc7835eec87282ac9484 (diff) | |
download | infinitytier-f692cec763d67caae54a4f47446657c390563319.tar.gz infinitytier-f692cec763d67caae54a4f47446657c390563319.zip |
Change how cluster relays packets -- just PROXY_UNITE and then send packet via normal ZeroTier front plane -- more efficient and eliminates fragmentation issues.
Diffstat (limited to 'node/Switch.hpp')
-rw-r--r-- | node/Switch.hpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/node/Switch.hpp b/node/Switch.hpp index 3bdc0c47..42e87ca5 100644 --- a/node/Switch.hpp +++ b/node/Switch.hpp @@ -127,15 +127,10 @@ public: * This only works if both peers are known, with known working direct * links to this peer. The best link for each peer is sent to the other. * - * A rate limiter is in effect via the _lastUniteAttempt map. If force - * is true, a unite attempt is made even if one has been made less than - * ZT_MIN_UNITE_INTERVAL milliseconds ago. - * * @param p1 One of two peers (order doesn't matter) * @param p2 Second of pair - * @param force If true, send now regardless of interval */ - bool unite(const Address &p1,const Address &p2,bool force); + bool unite(const Address &p1,const Address &p2); /** * Attempt NAT traversal to peer at a given physical address @@ -185,6 +180,7 @@ private: void _handleRemotePacketHead(const InetAddress &localAddr,const InetAddress &fromAddr,const void *data,unsigned int len); Address _sendWhoisRequest(const Address &addr,const Address *peersAlreadyConsulted,unsigned int numPeersAlreadyConsulted); bool _trySend(const Packet &packet,bool encrypt,uint64_t nwid); + bool _shouldTryUnite(const uint64_t now,const Address &p1,const Address &p2); const RuntimeEnvironment *const RR; uint64_t _lastBeaconResponse; |