mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
enable SSU2 server
This commit is contained in:
parent
6d7d71bb16
commit
21c1ec9c8c
5 changed files with 31 additions and 11 deletions
|
@ -157,7 +157,7 @@ namespace transport
|
|||
}
|
||||
}
|
||||
|
||||
void Transports::Start (bool enableNTCP2, bool enableSSU)
|
||||
void Transports::Start (bool enableNTCP2, bool enableSSU, bool enableSSU2)
|
||||
{
|
||||
if (!m_Service)
|
||||
{
|
||||
|
@ -217,7 +217,9 @@ namespace transport
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// create SSU2 server
|
||||
if (enableSSU2) m_SSU2Server = new SSU2Server ();
|
||||
|
||||
// bind to interfaces
|
||||
bool ipv4; i2p::config::GetOption("ipv4", ipv4);
|
||||
if (ipv4)
|
||||
|
@ -282,7 +284,8 @@ namespace transport
|
|||
}
|
||||
if (m_SSUServer) DetectExternalIP ();
|
||||
}
|
||||
|
||||
if (m_SSU2Server) m_SSU2Server->Start ();
|
||||
|
||||
m_PeerCleanupTimer->expires_from_now (boost::posix_time::seconds(5*SESSION_CREATION_TIMEOUT));
|
||||
m_PeerCleanupTimer->async_wait (std::bind (&Transports::HandlePeerCleanupTimer, this, std::placeholders::_1));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue