mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
pass local destination by pointer
This commit is contained in:
parent
6e32c389b1
commit
f357a5864c
8 changed files with 56 additions and 23 deletions
|
@ -26,10 +26,11 @@ namespace tunnel
|
|||
{
|
||||
public:
|
||||
|
||||
TunnelPool (i2p::garlic::GarlicDestination& localDestination, int numInboundHops, int numOutboundHops, int numTunnels = 5);
|
||||
TunnelPool (i2p::garlic::GarlicDestination * localDestination, int numInboundHops, int numOutboundHops, int numTunnels = 5);
|
||||
~TunnelPool ();
|
||||
|
||||
i2p::garlic::GarlicDestination& GetLocalDestination () const { return m_LocalDestination; };
|
||||
i2p::garlic::GarlicDestination * GetLocalDestination () const { return m_LocalDestination; };
|
||||
void SetLocalDestination (i2p::garlic::GarlicDestination * destination) { m_LocalDestination = destination; };
|
||||
|
||||
void CreateTunnels ();
|
||||
void TunnelCreated (InboundTunnel * createdTunnel);
|
||||
|
@ -41,6 +42,7 @@ namespace tunnel
|
|||
InboundTunnel * GetNextInboundTunnel (InboundTunnel * suggested = nullptr) const;
|
||||
|
||||
void TestTunnels ();
|
||||
void ProcessGarlicMessage (I2NPMessage * msg);
|
||||
void ProcessDeliveryStatus (I2NPMessage * msg);
|
||||
|
||||
bool IsActive () const { return m_IsActive; };
|
||||
|
@ -60,7 +62,7 @@ namespace tunnel
|
|||
|
||||
private:
|
||||
|
||||
i2p::garlic::GarlicDestination& m_LocalDestination;
|
||||
i2p::garlic::GarlicDestination * m_LocalDestination;
|
||||
int m_NumInboundHops, m_NumOutboundHops, m_NumTunnels;
|
||||
mutable std::mutex m_InboundTunnelsMutex;
|
||||
std::set<InboundTunnel *, TunnelCreationTimeCmp> m_InboundTunnels; // recent tunnel appears first
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue