libktorrent  2.2.0
Public Member Functions | Protected Attributes | List of all members
bt::ChokeAlgorithm Class Referenceabstract

#include <choker.h>

Inheritance diagram for bt::ChokeAlgorithm:
Inheritance graph
[legend]

Public Member Functions

virtual void doChokingLeechingState (PeerManager &pman, ChunkManager &cman, const TorrentStats &stats)=0
 
virtual void doChokingSeedingState (PeerManager &pman, ChunkManager &cman, const TorrentStats &stats)=0
 
Uint32 getOptimisticlyUnchokedPeerID () const
 Get the optimisticly unchoked peer ID.
 

Protected Attributes

Uint32 opt_unchoked_peer_id
 

Detailed Description

Base class for all choke algorithms.

Definition at line 40 of file choker.h.

Member Function Documentation

◆ doChokingLeechingState()

virtual void bt::ChokeAlgorithm::doChokingLeechingState ( PeerManager pman,
ChunkManager cman,
const TorrentStats stats 
)
pure virtual

Do the actual choking when we are still downloading.

Parameters
pmanThe PeerManager
cmanThe ChunkManager
statsThe torrent stats

Implemented in bt::AdvancedChokeAlgorithm.

◆ doChokingSeedingState()

virtual void bt::ChokeAlgorithm::doChokingSeedingState ( PeerManager pman,
ChunkManager cman,
const TorrentStats stats 
)
pure virtual

Do the actual choking when we are seeding

Parameters
pmanThe PeerManager
cmanThe ChunkManager
statsThe torrent stats

Implemented in bt::AdvancedChokeAlgorithm.


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