From 2fe71782a716977094a4312f50029fe46822c37c Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sat, 8 Apr 2017 15:14:47 -0400 Subject: [PATCH] tabify --- ClientContext.h | 2 +- MatchedDestination.h | 40 ++++++++++++++++++++-------------------- TunnelPool.h | 16 ++++++++-------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/ClientContext.h b/ClientContext.h index 5fade60c..672770df 100644 --- a/ClientContext.h +++ b/ClientContext.h @@ -35,7 +35,7 @@ namespace client const char I2P_CLIENT_TUNNEL_KEYS[] = "keys"; const char I2P_CLIENT_TUNNEL_SIGNATURE_TYPE[] = "signaturetype"; const char I2P_CLIENT_TUNNEL_DESTINATION_PORT[] = "destinationport"; - const char I2P_CLIENT_TUNNEL_MATCH_TUNNELS[] = "matchtunnels"; + const char I2P_CLIENT_TUNNEL_MATCH_TUNNELS[] = "matchtunnels"; const char I2P_SERVER_TUNNEL_HOST[] = "host"; const char I2P_SERVER_TUNNEL_HOST_OVERRIDE[] = "hostoverride"; const char I2P_SERVER_TUNNEL_PORT[] = "port"; diff --git a/MatchedDestination.h b/MatchedDestination.h index 33c1e234..bbeeb503 100644 --- a/MatchedDestination.h +++ b/MatchedDestination.h @@ -7,29 +7,29 @@ namespace i2p { namespace client { - /** - client tunnel that uses same OBEP as IBGW of each remote lease for a remote destination - */ - class MatchedTunnelDestination : public ClientDestination, public i2p::tunnel::ITunnelPeerSelector - { - public: - MatchedTunnelDestination(const i2p::data::PrivateKeys& keys, const std::string & remoteName, const std::map * params = nullptr); - bool Start(); - bool Stop(); + /** + client tunnel that uses same OBEP as IBGW of each remote lease for a remote destination + */ + class MatchedTunnelDestination : public ClientDestination, public i2p::tunnel::ITunnelPeerSelector + { + public: + MatchedTunnelDestination(const i2p::data::PrivateKeys& keys, const std::string & remoteName, const std::map * params = nullptr); + bool Start(); + bool Stop(); - bool SelectPeers(i2p::tunnel::Path & peers, int hops, bool inbound); - bool OnBuildResult(const i2p::tunnel::Path & peers, bool inbound, i2p::tunnel::TunnelBuildResult result); + bool SelectPeers(i2p::tunnel::Path & peers, int hops, bool inbound); + bool OnBuildResult(const i2p::tunnel::Path & peers, bool inbound, i2p::tunnel::TunnelBuildResult result); - private: - void ResolveCurrentLeaseSet(); - void HandleFoundCurrentLeaseSet(std::shared_ptr ls); + private: + void ResolveCurrentLeaseSet(); + void HandleFoundCurrentLeaseSet(std::shared_ptr ls); - private: - std::string m_RemoteName; - i2p::data::IdentHash m_RemoteIdent; - std::shared_ptr m_RemoteLeaseSet; - std::shared_ptr m_ResolveTimer; - }; + private: + std::string m_RemoteName; + i2p::data::IdentHash m_RemoteIdent; + std::shared_ptr m_RemoteLeaseSet; + std::shared_ptr m_ResolveTimer; + }; } } diff --git a/TunnelPool.h b/TunnelPool.h index d7e47876..07c3024e 100644 --- a/TunnelPool.h +++ b/TunnelPool.h @@ -30,21 +30,21 @@ namespace tunnel eBuildResultTimeout // tunnel build timed out }; - typedef std::shared_ptr Peer; - typedef std::vector Path; + typedef std::shared_ptr Peer; + typedef std::vector Path; /** interface for custom tunnel peer selection algorithm */ struct ITunnelPeerSelector { - virtual ~ITunnelPeerSelector() {}; + virtual ~ITunnelPeerSelector() {}; virtual bool SelectPeers(Path & peers, int hops, bool isInbound) = 0; virtual bool OnBuildResult(const Path & peers, bool isInbound, TunnelBuildResult result) = 0; }; - typedef std::function(std::shared_ptr)> SelectHopFunc; - // standard peer selection algorithm - bool StandardSelectPeers(Path & path, int hops, bool inbound, SelectHopFunc nextHop); + typedef std::function(std::shared_ptr)> SelectHopFunc; + // standard peer selection algorithm + bool StandardSelectPeers(Path & path, int hops, bool inbound, SelectHopFunc nextHop); class TunnelPool: public std::enable_shared_from_this // per local destination { @@ -95,8 +95,8 @@ namespace tunnel void OnTunnelBuildResult(std::shared_ptr tunnel, TunnelBuildResult result); - // for overriding tunnel peer selection - std::shared_ptr SelectNextHop (std::shared_ptr prevHop) const; + // for overriding tunnel peer selection + std::shared_ptr SelectNextHop (std::shared_ptr prevHop) const; private: