mirror of
https://github.com/transmission/transmission
synced 2025-03-12 07:03:44 +00:00
(trunk libT) #2338 "Add uTP support" -- increase the block bandwidth to 3000 bytes in phase 1 as suggested by jch in comment:120.
The rationale is that by using 3000 bytes we'll send one full-size frame straight away, and leave enough buffered data for the next frame to go out in a timely manner.
This commit is contained in:
parent
a0fd938fae
commit
f8f02fe7c3
1 changed files with 5 additions and 1 deletions
|
@ -225,7 +225,11 @@ phaseOne( tr_ptrArray * peerArray, tr_direction dir )
|
||||||
i = n ? tr_cryptoWeakRandInt( n ) : 0; /* pick a random starting point */
|
i = n ? tr_cryptoWeakRandInt( n ) : 0; /* pick a random starting point */
|
||||||
while( n > 0 )
|
while( n > 0 )
|
||||||
{
|
{
|
||||||
const size_t increment = 1024;
|
/* value of 3000 bytes chosen so that when using uTP we'll send a full-size
|
||||||
|
* frame right away and leave enough buffered data for the next frame to go
|
||||||
|
* out in a timely manner. */
|
||||||
|
const size_t increment = 3000;
|
||||||
|
|
||||||
const int bytesUsed = tr_peerIoFlush( peers[i], dir, increment );
|
const int bytesUsed = tr_peerIoFlush( peers[i], dir, increment );
|
||||||
|
|
||||||
dbgmsg( "peer #%d of %d used %d bytes in this pass", i, n, bytesUsed );
|
dbgmsg( "peer #%d of %d used %d bytes in this pass", i, n, bytesUsed );
|
||||||
|
|
Loading…
Add table
Reference in a new issue