mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-02 02:54:01 +01:00
more adequate initial RTT
This commit is contained in:
parent
6fb3c7c3ba
commit
5f1b31213f
|
@ -537,7 +537,7 @@ namespace stream
|
||||||
m_LocalDestination.DeletePacket (sentPacket);
|
m_LocalDestination.DeletePacket (sentPacket);
|
||||||
acknowledged = true;
|
acknowledged = true;
|
||||||
if (m_WindowSize < MAX_WINDOW_SIZE && !m_IsFirstACK)
|
if (m_WindowSize < MAX_WINDOW_SIZE && !m_IsFirstACK)
|
||||||
if (m_RTT < m_LocalDestination.GetRandom () % INITIAL_RTT) // dirty
|
if (m_RTT < m_LocalDestination.GetRandom () % INITIAL_RTO) // dirty
|
||||||
m_WindowIncCounter++;
|
m_WindowIncCounter++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1143,7 +1143,7 @@ namespace stream
|
||||||
CancelRemoteLeaseChange ();
|
CancelRemoteLeaseChange ();
|
||||||
UpdateCurrentRemoteLease (true);
|
UpdateCurrentRemoteLease (true);
|
||||||
}
|
}
|
||||||
if (m_RemoteLeaseChangeTime && m_IsRemoteLeaseChangeInProgress && ts > m_RemoteLeaseChangeTime + INITIAL_RTT)
|
if (m_RemoteLeaseChangeTime && m_IsRemoteLeaseChangeInProgress && ts > m_RemoteLeaseChangeTime + INITIAL_RTO)
|
||||||
{
|
{
|
||||||
CancelRemoteLeaseChange ();
|
CancelRemoteLeaseChange ();
|
||||||
m_CurrentRemoteLease = m_NextRemoteLease;
|
m_CurrentRemoteLease = m_NextRemoteLease;
|
||||||
|
|
|
@ -60,7 +60,7 @@ namespace stream
|
||||||
const double SLOWRTT_EWMA_ALPHA = 0.05;
|
const double SLOWRTT_EWMA_ALPHA = 0.05;
|
||||||
const double PREV_SPEED_KEEP_TIME_COEFF = 0.35; // 0.1 - 1 // how long will the window size stay around the previous drop level, less is longer
|
const double PREV_SPEED_KEEP_TIME_COEFF = 0.35; // 0.1 - 1 // how long will the window size stay around the previous drop level, less is longer
|
||||||
const int MIN_RTO = 20; // in milliseconds
|
const int MIN_RTO = 20; // in milliseconds
|
||||||
const int INITIAL_RTT = 8000; // in milliseconds
|
const int INITIAL_RTT = 1500; // in milliseconds
|
||||||
const int INITIAL_RTO = 9000; // in milliseconds
|
const int INITIAL_RTO = 9000; // in milliseconds
|
||||||
const int INITIAL_PACING_TIME = 1000 * INITIAL_RTT / INITIAL_WINDOW_SIZE; // in microseconds
|
const int INITIAL_PACING_TIME = 1000 * INITIAL_RTT / INITIAL_WINDOW_SIZE; // in microseconds
|
||||||
const int MIN_SEND_ACK_TIMEOUT = 2; // in milliseconds
|
const int MIN_SEND_ACK_TIMEOUT = 2; // in milliseconds
|
||||||
|
|
Loading…
Reference in a new issue