mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
renew connected receintly timestamp, add endpoint to the list if hole punch is being sent
This commit is contained in:
parent
ae26758170
commit
2fa4237acd
3 changed files with 13 additions and 5 deletions
|
@ -39,7 +39,7 @@ namespace transport
|
|||
const int SSU2_KEEP_ALIVE_INTERVAL = 15; // in seconds
|
||||
const int SSU2_KEEP_ALIVE_INTERVAL_VARIANCE = 4; // in seconds
|
||||
const int SSU2_PROXY_CONNECT_RETRY_TIMEOUT = 30; // in seconds
|
||||
const int SSU2_HOLE_PUNCH_EXPIRATION = 20; // in seconds
|
||||
const int SSU2_HOLE_PUNCH_EXPIRATION = 150; // in seconds
|
||||
|
||||
class SSU2Server: private i2p::util::RunnableServiceWithWork
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ namespace transport
|
|||
bool UsesProxy () const { return m_IsThroughProxy; };
|
||||
bool IsSupported (const boost::asio::ip::address& addr) const;
|
||||
uint16_t GetPort (bool v4) const;
|
||||
bool IsConnectedRecently (const boost::asio::ip::udp::endpoint& ep) const;
|
||||
bool IsConnectedRecently (const boost::asio::ip::udp::endpoint& ep);
|
||||
void AddConnectedRecently (const boost::asio::ip::udp::endpoint& ep, uint64_t ts);
|
||||
std::mt19937& GetRng () { return m_Rng; }
|
||||
bool IsMaxNumIntroducers (bool v4) const { return (v4 ? m_Introducers.size () : m_IntroducersV6.size ()) >= SSU2_MAX_NUM_INTRODUCERS; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue