move RunnableService away from LeaseSetDestination

This commit is contained in:
orignal 2020-02-02 18:58:58 -05:00
parent 49810eb153
commit 2d154ee640
7 changed files with 87 additions and 111 deletions

View file

@ -15,6 +15,7 @@
#include <thread>
#include <map>
#include <boost/asio.hpp>
#include "util.h"
#include "Destination.h"
namespace i2p
@ -61,12 +62,16 @@ namespace client
const char I2CP_PARAM_MESSAGE_RELIABILITY[] = "i2cp.messageReliability";
class I2CPSession;
class I2CPDestination: public LeaseSetDestination
class I2CPDestination: public i2p::util::RunnableService, public LeaseSetDestination
{
public:
I2CPDestination (std::shared_ptr<I2CPSession> owner, std::shared_ptr<const i2p::data::IdentityEx> identity, bool isPublic, const std::map<std::string, std::string>& params);
~I2CPDestination ();
void Start ();
void Stop ();
void SetEncryptionPrivateKey (const uint8_t * key);
void LeaseSetCreated (const uint8_t * buf, size_t len); // called from I2CPSession
void LeaseSet2Created (uint8_t storeType, const uint8_t * buf, size_t len); // called from I2CPSession