mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-30 08:04:04 +00:00
More experimentation with multicast rate.
This commit is contained in:
parent
55e7ddba1e
commit
07e1085dcc
@ -121,6 +121,15 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Most recent balance without update
|
||||
*/
|
||||
inline uint32_t balance() const
|
||||
throw()
|
||||
{
|
||||
return _balance;
|
||||
}
|
||||
|
||||
private:
|
||||
double _lastTime;
|
||||
uint32_t _balance;
|
||||
|
@ -581,6 +581,9 @@ public:
|
||||
bal = _multicastRateAccounts.insert(std::pair< std::pair<Address,MulticastGroup>,BandwidthAccount >(k,BandwidthAccount(r.preload,r.maxBalance,r.accrual))).first;
|
||||
}
|
||||
return bal->second.deduct(bytes);
|
||||
//bool tmp = bal->second.deduct(bytes);
|
||||
//printf("%s: BAL: %u\n",mg.toString().c_str(),(unsigned int)bal->second.balance());
|
||||
//return tmp;
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user