mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
bypass slow transport sessions
This commit is contained in:
parent
60e648bf9a
commit
cd1af85e39
6 changed files with 28 additions and 6 deletions
|
@ -72,15 +72,18 @@ namespace transport
|
|||
uint64_t creationTime, nextRouterInfoUpdateTime;
|
||||
std::vector<std::shared_ptr<i2p::I2NPMessage> > delayedMessages;
|
||||
std::vector<i2p::data::RouterInfo::SupportedTransports> priority;
|
||||
bool isHighBandwidth;
|
||||
bool isHighBandwidth, isReachable;
|
||||
|
||||
Peer (std::shared_ptr<const i2p::data::RouterInfo> r, uint64_t ts):
|
||||
numAttempts (0), router (r), creationTime (ts),
|
||||
nextRouterInfoUpdateTime (ts + PEER_ROUTER_INFO_UPDATE_INTERVAL),
|
||||
isHighBandwidth (false)
|
||||
isHighBandwidth (false), isReachable (false)
|
||||
{
|
||||
if (router)
|
||||
{
|
||||
isHighBandwidth = router->IsHighBandwidth ();
|
||||
isReachable = (bool)router->GetCompatibleTransports (true);
|
||||
}
|
||||
}
|
||||
|
||||
void Done ()
|
||||
|
@ -93,7 +96,10 @@ namespace transport
|
|||
{
|
||||
router = r;
|
||||
if (router)
|
||||
{
|
||||
isHighBandwidth = router->IsHighBandwidth ();
|
||||
isReachable = (bool)router->GetCompatibleTransports (true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue