mirror of
https://github.com/transmission/transmission.git
synced 2026-04-17 23:54:19 +01: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:
@@ -225,7 +225,11 @@ phaseOne( tr_ptrArray * peerArray, tr_direction dir )
|
||||
i = n ? tr_cryptoWeakRandInt( n ) : 0; /* pick a random starting point */
|
||||
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 );
|
||||
|
||||
dbgmsg( "peer #%d of %d used %d bytes in this pass", i, n, bytesUsed );
|
||||
|
||||
Reference in New Issue
Block a user