1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-22 04:04:16 +00:00

exploratory pool added

This commit is contained in:
orignal 2014-04-02 13:14:21 -04:00
parent 4970b4d14e
commit 489266e7fc
5 changed files with 6 additions and 4 deletions

View File

@ -255,7 +255,7 @@ namespace util
for (auto it: i2p::tunnel::tunnels.GetInboundTunnels ()) for (auto it: i2p::tunnel::tunnels.GetInboundTunnels ())
{ {
it.second->GetTunnelConfig ()->Print (s); it.second->GetTunnelConfig ()->Print (s);
if (it.second->GetTunnelPool ()) if (it.second->GetTunnelPool () && !it.second->GetTunnelPool ()->IsExploratory ())
s << " " << "Pool"; s << " " << "Pool";
if (it.second->IsFailed ()) if (it.second->IsFailed ())
s << " " << "Failed"; s << " " << "Failed";

View File

@ -167,7 +167,7 @@ namespace tunnel
Tunnels tunnels; Tunnels tunnels;
Tunnels::Tunnels (): m_IsRunning (false), m_IsTunnelCreated (false), Tunnels::Tunnels (): m_IsRunning (false), m_IsTunnelCreated (false),
m_NextReplyMsgID (555),m_Thread (0) m_NextReplyMsgID (555), m_Thread (nullptr), m_ExploratoryPool (nullptr)
{ {
} }

View File

@ -147,6 +147,7 @@ namespace tunnel
std::list<OutboundTunnel *> m_OutboundTunnels; std::list<OutboundTunnel *> m_OutboundTunnels;
std::map<uint32_t, TransitTunnel *> m_TransitTunnels; std::map<uint32_t, TransitTunnel *> m_TransitTunnels;
std::map<i2p::data::IdentHash, TunnelPool *> m_Pools; std::map<i2p::data::IdentHash, TunnelPool *> m_Pools;
TunnelPool * m_ExploratoryPool;
i2p::util::Queue<I2NPMessage> m_Queue; i2p::util::Queue<I2NPMessage> m_Queue;
public: public:

View File

@ -3,7 +3,6 @@
#include "Tunnel.h" #include "Tunnel.h"
#include "NetDb.h" #include "NetDb.h"
#include "Timestamp.h" #include "Timestamp.h"
#include "RouterContext.h"
#include "Garlic.h" #include "Garlic.h"
#include "TunnelPool.h" #include "TunnelPool.h"

View File

@ -9,6 +9,7 @@
#include "LeaseSet.h" #include "LeaseSet.h"
#include "I2NPProtocol.h" #include "I2NPProtocol.h"
#include "TunnelBase.h" #include "TunnelBase.h"
#include "RouterContext.h"
namespace i2p namespace i2p
{ {
@ -27,7 +28,8 @@ namespace tunnel
const uint8_t * GetEncryptionPrivateKey () const { return m_LocalDestination.GetEncryptionPrivateKey (); }; const uint8_t * GetEncryptionPrivateKey () const { return m_LocalDestination.GetEncryptionPrivateKey (); };
const uint8_t * GetEncryptionPublicKey () const { return m_LocalDestination.GetEncryptionPublicKey (); }; const uint8_t * GetEncryptionPublicKey () const { return m_LocalDestination.GetEncryptionPublicKey (); };
bool IsExploratory () const { return &m_LocalDestination == &i2p::context; };
void CreateTunnels (); void CreateTunnels ();
void TunnelCreated (InboundTunnel * createdTunnel); void TunnelCreated (InboundTunnel * createdTunnel);
void TunnelExpired (InboundTunnel * expiredTunnel); void TunnelExpired (InboundTunnel * expiredTunnel);