mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-10 21:51:04 +00:00
shorter ack request interval
This commit is contained in:
parent
b9c9988ff4
commit
72ff0b9fbb
@ -764,6 +764,7 @@ namespace client
|
|||||||
void I2CPSession::AddRoutingSession (const i2p::data::IdentHash& signingKey, std::shared_ptr<i2p::garlic::GarlicRoutingSession> remoteSession)
|
void I2CPSession::AddRoutingSession (const i2p::data::IdentHash& signingKey, std::shared_ptr<i2p::garlic::GarlicRoutingSession> remoteSession)
|
||||||
{
|
{
|
||||||
if (!remoteSession) return;
|
if (!remoteSession) return;
|
||||||
|
remoteSession->SetAckRequestInterval (I2CP_SESSION_ACK_REQUEST_INTERVAL);
|
||||||
std::lock_guard<std::mutex> l(m_RoutingSessionsMutex);
|
std::lock_guard<std::mutex> l(m_RoutingSessionsMutex);
|
||||||
m_RoutingSessions[signingKey] = remoteSession;
|
m_RoutingSessions[signingKey] = remoteSession;
|
||||||
}
|
}
|
||||||
@ -1110,12 +1111,12 @@ namespace client
|
|||||||
void I2CPServer::Stop ()
|
void I2CPServer::Stop ()
|
||||||
{
|
{
|
||||||
m_Acceptor.cancel ();
|
m_Acceptor.cancel ();
|
||||||
{
|
|
||||||
auto sessions = m_Sessions;
|
decltype(m_Sessions) sessions;
|
||||||
for (auto& it: sessions)
|
m_Sessions.swap (sessions);
|
||||||
it.second->Stop ();
|
for (auto& it: sessions)
|
||||||
}
|
it.second->Stop ();
|
||||||
m_Sessions.clear ();
|
|
||||||
StopIOService ();
|
StopIOService ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ namespace client
|
|||||||
const size_t I2CP_MAX_MESSAGE_LENGTH = 65535;
|
const size_t I2CP_MAX_MESSAGE_LENGTH = 65535;
|
||||||
const size_t I2CP_MAX_SEND_QUEUE_SIZE = 1024*1024; // in bytes, 1M
|
const size_t I2CP_MAX_SEND_QUEUE_SIZE = 1024*1024; // in bytes, 1M
|
||||||
const int I2CP_LEASESET_CREATION_TIMEOUT = 10; // in seconds
|
const int I2CP_LEASESET_CREATION_TIMEOUT = 10; // in seconds
|
||||||
|
const int I2CP_SESSION_ACK_REQUEST_INTERVAL = 12100; // in milliseconds
|
||||||
|
|
||||||
const size_t I2CP_HEADER_LENGTH_OFFSET = 0;
|
const size_t I2CP_HEADER_LENGTH_OFFSET = 0;
|
||||||
const size_t I2CP_HEADER_TYPE_OFFSET = I2CP_HEADER_LENGTH_OFFSET + 4;
|
const size_t I2CP_HEADER_TYPE_OFFSET = I2CP_HEADER_LENGTH_OFFSET + 4;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user