Add low-bandwidth mode

This commit is contained in:
Joseph Henry 2022-12-05 13:21:05 -08:00
parent 98b190c626
commit 3c9ea2b667
No known key found for this signature in database
GPG key ID: C45B33FF5EBC9344
6 changed files with 42 additions and 10 deletions

View file

@ -269,6 +269,16 @@ public:
_stats.inVerbBytes[v] += (uint64_t)bytes;
}
inline void setLowBandwidthMode(bool isEnabled)
{
_lowBandwidthMode = isEnabled;
}
inline bool lowBandwidthModeEnabled()
{
return _lowBandwidthMode;
}
private:
RuntimeEnvironment _RR;
RuntimeEnvironment *RR;
@ -316,6 +326,7 @@ private:
int64_t _lastMemoizedTraceSettings;
volatile int64_t _prngState[2];
bool _online;
bool _lowBandwidthMode;
};
} // namespace ZeroTier