mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
move RunnableService away from LeaseSetDestination
This commit is contained in:
parent
49810eb153
commit
2d154ee640
7 changed files with 87 additions and 111 deletions
|
@ -24,10 +24,35 @@ namespace client
|
|||
{
|
||||
|
||||
I2CPDestination::I2CPDestination (std::shared_ptr<I2CPSession> owner, std::shared_ptr<const i2p::data::IdentityEx> identity, bool isPublic, const std::map<std::string, std::string>& params):
|
||||
LeaseSetDestination (isPublic, ¶ms), m_Owner (owner), m_Identity (identity)
|
||||
RunnableService ("I2CP"), LeaseSetDestination (GetService (), isPublic, ¶ms),
|
||||
m_Owner (owner), m_Identity (identity)
|
||||
{
|
||||
}
|
||||
|
||||
I2CPDestination::~I2CPDestination ()
|
||||
{
|
||||
if (IsRunning ())
|
||||
Stop ();
|
||||
}
|
||||
|
||||
void I2CPDestination::Start ()
|
||||
{
|
||||
if (!IsRunning ())
|
||||
{
|
||||
LeaseSetDestination::Start ();
|
||||
StartService ();
|
||||
}
|
||||
}
|
||||
|
||||
void I2CPDestination::Stop ()
|
||||
{
|
||||
if (IsRunning ())
|
||||
{
|
||||
LeaseSetDestination::Stop ();
|
||||
StopService ();
|
||||
}
|
||||
}
|
||||
|
||||
void I2CPDestination::SetEncryptionPrivateKey (const uint8_t * key)
|
||||
{
|
||||
memcpy (m_EncryptionPrivateKey, key, 256);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue