mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
manage tunnel pools
This commit is contained in:
parent
cba18faa87
commit
ab23327da6
7 changed files with 70 additions and 46 deletions
11
TunnelPool.h
11
TunnelPool.h
|
@ -24,11 +24,9 @@ namespace tunnel
|
|||
~TunnelPool ();
|
||||
|
||||
void CreateTunnels ();
|
||||
std::vector<InboundTunnel *> GetInboundTunnels (int num) const;
|
||||
|
||||
void TunnelCreationFailed (Tunnel * failedTunnel);
|
||||
void TunnelExpired (InboundTunnel * expiredTunnel);
|
||||
void TunnelCreated (InboundTunnel * createdTunnel);
|
||||
std::vector<InboundTunnel *> GetInboundTunnels (int num) const;
|
||||
void ManageTunnels ();
|
||||
|
||||
private:
|
||||
|
||||
|
@ -39,6 +37,11 @@ namespace tunnel
|
|||
i2p::data::LocalDestination * m_Owner;
|
||||
int m_NumTunnels;
|
||||
std::set<InboundTunnel *, TunnelCreationTimeCmp> m_InboundTunnels; // recent tunnel appears first
|
||||
|
||||
public:
|
||||
|
||||
// for HTTP only
|
||||
const decltype(m_InboundTunnels)& GetInboundTunnels () const { return m_InboundTunnels; };
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue