mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
I2P -> .NET
This commit is contained in:
parent
f176f1909b
commit
fdb0ce6703
272 changed files with 5702 additions and 8931 deletions
36
libdotnet_client/MatchedDestination.h
Normal file
36
libdotnet_client/MatchedDestination.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
#ifndef MATCHED_DESTINATION_H_
|
||||
#define MATCHED_DESTINATION_H_
|
||||
#include "Destination.h"
|
||||
#include <string>
|
||||
|
||||
namespace dotnet
|
||||
{
|
||||
namespace client
|
||||
{
|
||||
/**
|
||||
client tunnel that uses same OBEP as IBGW of each remote lease for a remote destination
|
||||
*/
|
||||
class MatchedTunnelDestination : public ClientDestination, public dotnet::tunnel::ITunnelPeerSelector
|
||||
{
|
||||
public:
|
||||
MatchedTunnelDestination(const dotnet::data::PrivateKeys& keys, const std::string & remoteName, const std::map<std::string, std::string> * params = nullptr);
|
||||
bool Start();
|
||||
bool Stop();
|
||||
|
||||
bool SelectPeers(dotnet::tunnel::Path & peers, int hops, bool inbound);
|
||||
bool OnBuildResult(const dotnet::tunnel::Path & peers, bool inbound, dotnet::tunnel::TunnelBuildResult result);
|
||||
|
||||
private:
|
||||
void ResolveCurrentLeaseSet();
|
||||
void HandleFoundCurrentLeaseSet(std::shared_ptr<const dotnet::data::LeaseSet> ls);
|
||||
|
||||
private:
|
||||
std::string m_RemoteName;
|
||||
dotnet::data::IdentHash m_RemoteIdent;
|
||||
std::shared_ptr<const dotnet::data::LeaseSet> m_RemoteLeaseSet;
|
||||
std::shared_ptr<boost::asio::deadline_timer> m_ResolveTimer;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue