Changeset 6406


Ignore:
Timestamp:
Jul 27, 2008, 2:10:32 PM (13 years ago)
Author:
charles
Message:

(daemon) #1107: transmission-remote -t[n] -i should display webseeding info

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-mgr.c

    r6259 r6406  
    4444    RECHOKE_PERIOD_MSEC = (10 * 1000),
    4545
    46     /* how frequently to refill peers' request lists */
    47     REFILL_PERIOD_MSEC = 666,
    48 
    49     /* following the BT spec, we consider ourselves `snubbed' if
    50      * we're we don't get piece data from a peer in this long */
    51     SNUBBED_SEC = 60,
     46    /* minimum interval for refilling peers' request lists */
     47    REFILL_PERIOD_MSEC = 333,
    5248
    5349    /* when many peers are available, keep idle ones this long */
     
    6763    MAX_CONNECTIONS_PER_SECOND = 8,
    6864
    69     /* number of unchoked peers per torrent */
     65    /* number of unchoked peers per torrent.
     66     * FIXME: this probably ought to be configurable */
    7067    MAX_UNCHOKED_PEERS = 12,
    7168
     
    15271524struct ChokeData
    15281525{
    1529     uint8_t doUnchoke;
    1530     uint8_t isInterested;
     1526    unsigned int  doUnchoke     : 1;
     1527    unsigned int  isInterested  : 1;
    15311528    uint32_t rate;
    15321529    tr_peer * peer;
     
    18121809        if( ( now - atom->piece_data_time ) > 30 )
    18131810        {
    1814             int minWait = (60 * 10); /* ten minutes */
    1815             int maxWait = (60 * 30); /* thirty minutes */
     1811            int minWait = (60 * 5); /* five minutes */
     1812            int maxWait = minWait * 3;
    18161813            int wait = atom->numFails * minWait;
    18171814            if( wait < minWait ) wait = minWait;
  • trunk/libtransmission/peer-msgs.c

    r6360 r6406  
    8989    /* used in lowering the outMessages queue period */
    9090    IMMEDIATE_PRIORITY_INTERVAL_SECS = 0,
    91     HIGH_PRIORITY_INTERVAL_SECS = 5,
    92     LOW_PRIORITY_INTERVAL_SECS = 30
     91    HIGH_PRIORITY_INTERVAL_SECS = 2,
     92    LOW_PRIORITY_INTERVAL_SECS = 20
    9393};
    9494
     
    289289    uint16_t maxActiveRequests;
    290290
     291    /* how long the outMessages batch should be allowed to grow before
     292     * it's flushed -- some messages (like requests >:) should be sent
     293     * very quickly; others aren't as urgent. */
     294    int outMessagesBatchPeriod;
     295
    291296    tr_peer * info;
    292297
     
    314319    /* when we started batching the outMessages */
    315320    time_t outMessagesBatchedAt;
    316 
    317     /* how long the outMessages batch should be allowed to grow before
    318      * it's flushed -- some messages (like requests >:) should be sent
    319      * very quickly; others aren't as urgent. */
    320     int outMessagesBatchPeriod;
    321321   
    322322    tr_bitfield * peerAllowedPieces;
     
    16711671            len -= outlen;
    16721672            msgs->clientSentAnythingAt = now;
    1673             msgs->sendingBlock = len!=0;
     1673            msgs->sendingBlock = len != 0;
    16741674
    16751675            dbgmsg( msgs, "wrote %d bytes; %d left in block", (int)outlen, (int)len );
Note: See TracChangeset for help on using the changeset viewer.