mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
don't accept tunnels if bandwidth is exceeded
This commit is contained in:
parent
b693d13144
commit
47c3d5ed23
5 changed files with 11 additions and 2 deletions
|
@ -68,6 +68,7 @@ namespace transport
|
|||
};
|
||||
|
||||
const size_t SESSION_CREATION_TIMEOUT = 10; // in seconds
|
||||
const uint32_t LOW_BANDWIDTH_LIMIT = 32*1024; // 32KBs
|
||||
class Transports
|
||||
{
|
||||
public:
|
||||
|
@ -96,6 +97,7 @@ namespace transport
|
|||
uint64_t GetTotalReceivedBytes () const { return m_TotalReceivedBytes; };
|
||||
uint32_t GetInBandwidth () const { return m_InBandwidth; }; // bytes per second
|
||||
uint32_t GetOutBandwidth () const { return m_OutBandwidth; }; // bytes per second
|
||||
bool IsBandwidthExceeded () const;
|
||||
|
||||
private:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue