Changeset 7402 for trunk/libtransmission/peer-io.c
- Timestamp:
- Dec 15, 2008, 9:22:08 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/peer-io.c
r7289 r7402 544 544 { 545 545 /* this is all kind of arbitrary, but what seems to work well is 546 * being large enough to hold the next 15seconds' worth of input,547 * or two and a halfblocks, whichever is bigger.546 * being large enough to hold the next 20 seconds' worth of input, 547 * or a few blocks, whichever is bigger. 548 548 * It's okay to tweak this as needed */ 549 549 const double maxBlockSize = 16 * 1024; /* 16 KiB is from BT spec */ 550 550 const double currentSpeed = tr_bandwidthGetPieceSpeed( io->bandwidth, TR_UP ); 551 551 const double period = 20; /* arbitrary */ 552 return MAX( maxBlockSize* 2.5, currentSpeed*1024*period );552 return MAX( maxBlockSize*5.5, currentSpeed*1024*period ); 553 553 } 554 554
Note: See TracChangeset
for help on using the changeset viewer.