mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
limit stream's outbound speed
This commit is contained in:
parent
df787060c3
commit
0428b5ece1
5 changed files with 41 additions and 21 deletions
|
@ -180,7 +180,6 @@ namespace client
|
|||
i2p::tunnel::tunnels.StopTunnelPool (m_Pool);
|
||||
}
|
||||
SaveTags ();
|
||||
m_Service.stop (); // make sure we don't process more messages after this point. TODO: implement it better
|
||||
CleanUp (); // GarlicDestination
|
||||
}
|
||||
|
||||
|
@ -980,6 +979,7 @@ namespace client
|
|||
bool isPublic, const std::map<std::string, std::string> * params):
|
||||
LeaseSetDestination (service, isPublic, params),
|
||||
m_Keys (keys), m_StreamingAckDelay (DEFAULT_INITIAL_ACK_DELAY),
|
||||
m_StreamingOutboundSpeed (DEFAULT_MAX_OUTBOUND_SPEED),
|
||||
m_IsStreamingAnswerPings (DEFAULT_ANSWER_PINGS), m_LastPort (0),
|
||||
m_DatagramDestination (nullptr), m_RefCounter (0),
|
||||
m_ReadyChecker(service)
|
||||
|
@ -1048,6 +1048,9 @@ namespace client
|
|||
auto it = params->find (I2CP_PARAM_STREAMING_INITIAL_ACK_DELAY);
|
||||
if (it != params->end ())
|
||||
m_StreamingAckDelay = std::stoi(it->second);
|
||||
it = params->find (I2CP_PARAM_STREAMING_MAX_OUTBOUND_SPEED);
|
||||
if (it != params->end ())
|
||||
m_StreamingOutboundSpeed = std::stoi(it->second);
|
||||
it = params->find (I2CP_PARAM_STREAMING_ANSWER_PINGS);
|
||||
if (it != params->end ())
|
||||
m_IsStreamingAnswerPings = std::stoi (it->second); // 1 for true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue