|
|
@ -8,9 +8,6 @@ |
|
|
|
#include <set> |
|
|
|
#include <set> |
|
|
|
#include <string> |
|
|
|
#include <string> |
|
|
|
#include <functional> |
|
|
|
#include <functional> |
|
|
|
#ifdef I2LUA |
|
|
|
|
|
|
|
#include <future> |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
#include <boost/asio.hpp> |
|
|
|
#include <boost/asio.hpp> |
|
|
|
#include "Identity.h" |
|
|
|
#include "Identity.h" |
|
|
|
#include "TunnelPool.h" |
|
|
|
#include "TunnelPool.h" |
|
|
@ -196,13 +193,6 @@ namespace client |
|
|
|
class ClientDestination: public LeaseSetDestination |
|
|
|
class ClientDestination: public LeaseSetDestination |
|
|
|
{ |
|
|
|
{ |
|
|
|
public: |
|
|
|
public: |
|
|
|
#ifdef I2LUA |
|
|
|
|
|
|
|
// type for informing that a client destination is ready
|
|
|
|
|
|
|
|
typedef std::promise<std::shared_ptr<ClientDestination> > ReadyPromise; |
|
|
|
|
|
|
|
// informs promise with shared_from_this() when this destination is ready to use
|
|
|
|
|
|
|
|
// if cancelled before ready, informs promise with nullptr
|
|
|
|
|
|
|
|
void Ready(ReadyPromise & p); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ClientDestination (boost::asio::io_service& service, const i2p::data::PrivateKeys& keys, |
|
|
|
ClientDestination (boost::asio::io_service& service, const i2p::data::PrivateKeys& keys, |
|
|
|
bool isPublic, const std::map<std::string, std::string> * params = nullptr); |
|
|
|
bool isPublic, const std::map<std::string, std::string> * params = nullptr); |
|
|
@ -251,14 +241,10 @@ namespace client |
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
private: |
|
|
|
|
|
|
|
|
|
|
|
std::shared_ptr<ClientDestination> GetSharedFromThis () |
|
|
|
std::shared_ptr<ClientDestination> GetSharedFromThis () { |
|
|
|
{ return std::static_pointer_cast<ClientDestination>(shared_from_this ()); } |
|
|
|
return std::static_pointer_cast<ClientDestination>(shared_from_this ()); |
|
|
|
|
|
|
|
} |
|
|
|
void PersistTemporaryKeys (); |
|
|
|
void PersistTemporaryKeys (); |
|
|
|
#ifdef I2LUA |
|
|
|
|
|
|
|
void ScheduleCheckForReady(ReadyPromise * p); |
|
|
|
|
|
|
|
void HandleCheckForReady(const boost::system::error_code & ecode, ReadyPromise * p); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ReadAuthKey (const std::string& group, const std::map<std::string, std::string> * params); |
|
|
|
void ReadAuthKey (const std::string& group, const std::map<std::string, std::string> * params); |
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
private: |
|
|
|