mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
slow start and congestion avoidance
This commit is contained in:
parent
974a7ff3f5
commit
5887e8c8c4
2 changed files with 29 additions and 3 deletions
|
@ -45,6 +45,9 @@ namespace stream
|
|||
const int ACK_SEND_TIMEOUT = 200; // in milliseconds
|
||||
const int MAX_NUM_RESEND_ATTEMPTS = 5;
|
||||
const int WINDOW_SIZE = 6; // in messages
|
||||
const int MIN_WINDOW_SIZE = 1;
|
||||
const int MAX_WINDOW_SIZE = 128;
|
||||
const int INITIAL_RTT = 8000; // in milliseconds
|
||||
|
||||
struct Packet
|
||||
{
|
||||
|
@ -157,6 +160,8 @@ namespace stream
|
|||
|
||||
std::mutex m_SendBufferMutex;
|
||||
std::stringstream m_SendBuffer;
|
||||
int m_WindowSize;
|
||||
uint64_t m_LastWindowSizeIncreaseTime;
|
||||
};
|
||||
|
||||
class StreamingDestination
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue