Yet more cleanup to TCP logic, this time adding a master switch and adding UDP preference in send().

This commit is contained in:
Adam Ierymenko 2014-04-09 17:08:35 -07:00
parent 73153b89b4
commit 8fb442d81a
6 changed files with 110 additions and 76 deletions

View file

@ -64,6 +64,7 @@ class RuntimeEnvironment
public:
RuntimeEnvironment() :
shutdownInProgress(false),
tcpTunnelingEnabled(false),
timeOfLastResynchronize(0),
timeOfLastPacketReceived(0),
log((Logger *)0),
@ -90,6 +91,9 @@ public:
// Indicates that we are shutting down -- this is hacky, want to factor out
volatile bool shutdownInProgress;
// Are we in outgoing TCP failover mode?
volatile bool tcpTunnelingEnabled;
// Time network environment (e.g. fingerprint) last changed -- used to determine online-ness
volatile uint64_t timeOfLastResynchronize;