libktorrent  2.2.0
Public Member Functions | Static Public Member Functions | List of all members
bt::Choker Class Reference

Handles the choking. More...

#include <choker.h>

Public Member Functions

 Choker (PeerManager &pman, ChunkManager &cman)
 
Uint32 getOptimisticlyUnchokedPeerID () const
 Get the PeerID of the optimisticly unchoked peer.
 
void update (bool have_all, const TorrentStats &stats)
 

Static Public Member Functions

static Uint32 getNumUploadSlots ()
 Get the number of upload slots.
 
static void setNumUploadSlots (Uint32 n)
 Set the number of upload slots.
 

Detailed Description

Author
Joris Guisson This class handles the choking and unchoking of Peer's. This class needs to be updated every 10 seconds.

Definition at line 95 of file choker.h.

Member Function Documentation

◆ update()

void bt::Choker::update ( bool  have_all,
const TorrentStats stats 
)

Update which peers are choked or not.

Parameters
have_allIndicates whether we have the entire file
statsStatistic of the torrent

The documentation for this class was generated from the following file: