mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
extra bandwidth caps
This commit is contained in:
parent
45e7111dda
commit
7149b509d7
7 changed files with 44 additions and 16 deletions
10
Daemon.cpp
10
Daemon.cpp
|
@ -78,16 +78,20 @@ namespace i2p
|
|||
i2p::context.UpdateAddress (boost::asio::ip::address::from_string (host));
|
||||
|
||||
i2p::context.SetSupportsV6 (i2p::util::config::GetArg("-v6", 0));
|
||||
i2p::context.SetFloodfill (i2p::util::config::GetArg("-floodfill", 0));
|
||||
bool isFloodfill = i2p::util::config::GetArg("-floodfill", 0);
|
||||
i2p::context.SetFloodfill (isFloodfill);
|
||||
auto bandwidth = i2p::util::config::GetArg("-bandwidth", "");
|
||||
if (bandwidth.length () > 0)
|
||||
{
|
||||
if (bandwidth[0] > 'L')
|
||||
if (bandwidth[0] > 'O')
|
||||
i2p::context.SetExtraBandwidth ();
|
||||
else if (bandwidth[0] > 'L')
|
||||
i2p::context.SetHighBandwidth ();
|
||||
else
|
||||
i2p::context.SetLowBandwidth ();
|
||||
}
|
||||
|
||||
else if (isFloodfill)
|
||||
i2p::context.SetExtraBandwidth ();
|
||||
LogPrint(eLogDebug, "Daemon: CMD parameters:");
|
||||
for (int i = 0; i < argc; ++i)
|
||||
LogPrint(eLogDebug, i, ": ", argv[i]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue