mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
minimal send ack interval
This commit is contained in:
parent
5d924cd35a
commit
935e93eb36
@ -182,6 +182,7 @@ namespace stream
|
|||||||
m_IsAckSendScheduled = true;
|
m_IsAckSendScheduled = true;
|
||||||
auto ackTimeout = m_RTT/10;
|
auto ackTimeout = m_RTT/10;
|
||||||
if (ackTimeout > m_AckDelay) ackTimeout = m_AckDelay;
|
if (ackTimeout > m_AckDelay) ackTimeout = m_AckDelay;
|
||||||
|
else if (ackTimeout < MIN_SEND_ACK_TIMEOUT) ackTimeout = MIN_SEND_ACK_TIMEOUT;
|
||||||
m_AckSendTimer.expires_from_now (boost::posix_time::milliseconds(ackTimeout));
|
m_AckSendTimer.expires_from_now (boost::posix_time::milliseconds(ackTimeout));
|
||||||
m_AckSendTimer.async_wait (std::bind (&Stream::HandleAckSendTimer,
|
m_AckSendTimer.async_wait (std::bind (&Stream::HandleAckSendTimer,
|
||||||
shared_from_this (), std::placeholders::_1));
|
shared_from_this (), std::placeholders::_1));
|
||||||
|
@ -58,6 +58,7 @@ namespace stream
|
|||||||
const int MAX_WINDOW_SIZE = 128;
|
const int MAX_WINDOW_SIZE = 128;
|
||||||
const int INITIAL_RTT = 8000; // in milliseconds
|
const int INITIAL_RTT = 8000; // in milliseconds
|
||||||
const int INITIAL_RTO = 9000; // in milliseconds
|
const int INITIAL_RTO = 9000; // in milliseconds
|
||||||
|
const int MIN_SEND_ACK_TIMEOUT = 2; // in milliseconds
|
||||||
const int SYN_TIMEOUT = 200; // how long we wait for SYN after follow-on, in milliseconds
|
const int SYN_TIMEOUT = 200; // how long we wait for SYN after follow-on, in milliseconds
|
||||||
const size_t MAX_PENDING_INCOMING_BACKLOG = 128;
|
const size_t MAX_PENDING_INCOMING_BACKLOG = 128;
|
||||||
const int PENDING_INCOMING_TIMEOUT = 10; // in seconds
|
const int PENDING_INCOMING_TIMEOUT = 10; // in seconds
|
||||||
|
Loading…
Reference in New Issue
Block a user