Ignore:
Timestamp:
Jan 30, 2006, 6:54:31 AM (16 years ago)
Author:
titer
Message:

New choking algorithm (still needs work, it's inefficient, untested and
misses optimistic choking)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peerutils.h

    r62 r65  
    136136    }
    137137
    138     /* TODO: check for bad downloaders */
    139 
    140 #if 0
    141     /* Choke unchoked peers we are not sending anything to */
    142     if( !peer->amChoking && tr_date() > peer->outDate + 10000 )
    143     {
    144         peer_dbg( "not worth the unchoke" );
    145         if( sendChoke( peer, 1 ) )
    146         {
    147             goto dropPeer;
    148         }
    149         peer->outSlow = 1;
    150         tr_uploadChoked( tor->upload );
    151     }
    152 #endif
    153 
    154138    if( peer->status & PEER_STATUS_CONNECTED )
    155139    {
     
    159143            sendKeepAlive( peer );
    160144            peer->keepAlive = tr_date();
    161         }
    162 
    163         /* Choke or unchoke some people */
    164         /* TODO: prefer people who upload to us */
    165         if( !peer->amChoking && !peer->peerInterested )
    166         {
    167             /* He doesn't need us */
    168             sendChoke( peer, 1 );
    169             //tr_uploadChoked( tor->upload );
    170         }
    171         if( peer->amChoking && peer->peerInterested /* &&
    172             !peer->outSlow && tr_uploadCanUnchoke( tor->upload ) */ )
    173         {
    174             sendChoke( peer, 0 );
    175             //tr_uploadUnchoked( tor->upload );
    176145        }
    177146    }
Note: See TracChangeset for help on using the changeset viewer.