summaryrefslogtreecommitdiff
path: root/node/Network.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-08-09 16:36:58 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-08-09 16:36:58 -0400
commit6a24ac4f00cfb3fd260c8f29acbb7f5c7b61b3c8 (patch)
treea79796050f5ce86aa06c0c5137243e234bb92013 /node/Network.cpp
parent3af55f4423ab527a7366a56d552a4641560bc6f2 (diff)
downloadinfinitytier-6a24ac4f00cfb3fd260c8f29acbb7f5c7b61b3c8.tar.gz
infinitytier-6a24ac4f00cfb3fd260c8f29acbb7f5c7b61b3c8.zip
Add a concept of debt to RateLimiter, save a bit of RAM.
Diffstat (limited to 'node/Network.cpp')
-rw-r--r--node/Network.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/node/Network.cpp b/node/Network.cpp
index a93740f8..9227cd34 100644
--- a/node/Network.cpp
+++ b/node/Network.cpp
@@ -140,6 +140,9 @@ SharedPtr<Network> Network::newInstance(const RuntimeEnvironment *renv,uint64_t
// being constructed. C++ edge cases, how I love thee.
SharedPtr<Network> nw(new Network());
nw->_r = renv;
+ nw->_rlLimit.bytesPerSecond = ZT_MULTICAST_DEFAULT_BYTES_PER_SECOND;
+ nw->_rlLimit.maxBalance = ZT_MULTICAST_DEFAULT_RATE_MAX_BALANCE;
+ nw->_rlLimit.minBalance = ZT_MULTICAST_DEFAULT_RATE_MIN_BALANCE;
nw->_tap = new EthernetTap(renv,renv->identity.address().toMAC(),ZT_IF_MTU,&_CBhandleTapData,nw.ptr());
nw->_id = id;
nw->_lastConfigUpdate = 0;