summaryrefslogtreecommitdiff
path: root/node/Cluster.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-11-09 12:24:49 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-11-09 12:24:49 -0800
commit73e2c6e5117aba36566c22edc1c19c8d6347d317 (patch)
tree5a3a1aaa9ba148623743293d737167e3748a97db /node/Cluster.hpp
parent12cd9df059dc70bed3da6c2a1041329f995e2a9d (diff)
downloadinfinitytier-73e2c6e5117aba36566c22edc1c19c8d6347d317.tar.gz
infinitytier-73e2c6e5117aba36566c22edc1c19c8d6347d317.zip
How did that ever work?
Diffstat (limited to 'node/Cluster.hpp')
-rw-r--r--node/Cluster.hpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/node/Cluster.hpp b/node/Cluster.hpp
index 63196928..4197a14b 100644
--- a/node/Cluster.hpp
+++ b/node/Cluster.hpp
@@ -39,6 +39,7 @@
#include "Constants.hpp"
#include "../include/ZeroTierOne.h"
#include "Address.hpp"
+#include "Array.hpp"
#include "InetAddress.hpp"
#include "SHA512.hpp"
#include "Utils.hpp"
@@ -74,7 +75,7 @@
/**
* Expiration time for send queue entries
*/
-#define ZT_CLUSTER_QUEUE_EXPIRATION 1500
+#define ZT_CLUSTER_QUEUE_EXPIRATION 500
namespace ZeroTier {
@@ -372,18 +373,20 @@ private:
struct _SQE
{
_SQE() : timestamp(0),len(0),unite(false) {}
- _SQE(const uint64_t ts,const Address &t,const void *d,const unsigned int l,const bool u) :
+ _SQE(const uint64_t ts,const Address &f,const Address &t,const void *d,const unsigned int l,const bool u) :
timestamp(ts),
+ fromPeerAddress(f),
toPeerAddress(t),
len(l),
unite(u) { memcpy(data,d,l); }
uint64_t timestamp;
+ Address fromPeerAddress;
Address toPeerAddress;
unsigned int len;
bool unite;
unsigned char data[ZT_PROTO_MAX_PACKET_LENGTH];
};
- std::map< Address,std::list<_SQE> > _sendViaClusterQueue;
+ std::list<_SQE> _sendViaClusterQueue;
Mutex _sendViaClusterQueue_m;
uint64_t _lastFlushed;