mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-13 11:32:48 -04:00
Improvements to the file transfer algorithm.
Increased max individual file speed to 1MB/s git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@826 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3d3f4bfec9
commit
7c596231e1
3 changed files with 91 additions and 10 deletions
|
@ -63,7 +63,9 @@ public:
|
|||
peerInfo(std::string peerId_in,uint32_t state_in,uint32_t maxRate_in):
|
||||
peerId(peerId_in),state(state_in),desiredRate(maxRate_in),actualRate(0),
|
||||
offset(0),chunkSize(0),receivedSize(0),lastTS(0),
|
||||
recvTS(0), lastTransfers(0), nResets(0)
|
||||
recvTS(0), lastTransfers(0), nResets(0),
|
||||
rtt(0), rttActive(false), rttStart(0), rttOffset(0),
|
||||
mRateIncrease(1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -83,6 +85,13 @@ public:
|
|||
time_t recvTS; /* last Recv */
|
||||
uint32_t lastTransfers; /* data recvd in last second */
|
||||
uint32_t nResets; /* count to disable non-existant files */
|
||||
|
||||
/* rrt rate control */
|
||||
uint32_t rtt; /* last rtt */
|
||||
bool rttActive; /* have we initialised an rtt measurement */
|
||||
time_t rttStart; /* ts of request */
|
||||
uint64_t rttOffset; /* end of request */
|
||||
float mRateIncrease; /* current rate */
|
||||
};
|
||||
|
||||
class ftFileStatus
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue