mirror of https://github.com/PurpleI2P/i2pd
TunnelPool added
parent
70df239d14
commit
7caa46b381
@ -0,0 +1,26 @@
|
||||
#include "Tunnel.h"
|
||||
#include "TunnelPool.h"
|
||||
|
||||
namespace i2p
|
||||
{
|
||||
namespace tunnel
|
||||
{
|
||||
TunnelPool::TunnelPool ()
|
||||
{
|
||||
}
|
||||
|
||||
TunnelPool::~TunnelPool ()
|
||||
{
|
||||
for (auto it: m_InboundTunnels)
|
||||
it->SetTunnelPool (nullptr);
|
||||
}
|
||||
|
||||
void TunnelPool::TunnelCreationFailed (Tunnel * failedTunnel)
|
||||
{
|
||||
}
|
||||
|
||||
void TunnelPool::TunnelExpired (InboundTunnel * expiredTunnel)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
#ifndef TUNNEL_POOL__
|
||||
#define TUNNEL_POOL__
|
||||
|
||||
#include <list>
|
||||
#include "LeaseSet.h"
|
||||
|
||||
namespace i2p
|
||||
{
|
||||
namespace tunnel
|
||||
{
|
||||
class Tunnel;
|
||||
class InboundTunnel;
|
||||
class OutboundTunnel;
|
||||
|
||||
class TunnelPool // per local destination
|
||||
{
|
||||
public:
|
||||
|
||||
TunnelPool ();
|
||||
~TunnelPool ();
|
||||
|
||||
void TunnelCreationFailed (Tunnel * failedTunnel);
|
||||
void TunnelExpired (InboundTunnel * expiredTunnel);
|
||||
|
||||
private:
|
||||
|
||||
std::list<InboundTunnel *> m_InboundTunnels;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue