C# Class OctoTorrent.Client.SlidingWindowPicker

Generates a sliding window with high, medium, and low priority sets. The high priority set is downloaded first and in order. The medium and low priority sets are downloaded rarest first. This is intended to be used with a BitTorrent streaming application. The high priority set represents pieces that are needed SOON. This set is updated by calling code, to adapt for events (e.g. user fast-forwards or seeks, etc.)
Inheritance: OctoTorrent.Client.PiecePicker
Afficher le fichier Open project: Eskat0n/OctoTorrent

Méthodes publiques

Méthode Description
Initialise ( BitField bitfield, TorrentFile files, IEnumerable requests ) : void

PickPiece ( PeerId id, BitField peerBitfield, List otherPeers, int count, int startIndex, int endIndex ) : MessageBundle
SlidingWindowPicker ( OctoTorrent.Client.PiecePicker picker ) : System

Empty constructor for changing piece pickers

Private Methods

Méthode Description
SlidingWindowPicker ( OctoTorrent.Client.PiecePicker picker, int highPrioritySetSize ) : System

Creates a new piece picker with support for prioritization of files. The sliding window will be positioned to the start of the first file to be downloaded

SlidingWindowPicker ( OctoTorrent.Client.PiecePicker picker, int highPrioritySetSize, int mediumToHighRatio ) : System

Create a new SlidingWindowPicker with the given set sizes. The sliding window will be positioned to the start of the first file to be downloaded

Method Details

Initialise() public méthode

public Initialise ( BitField bitfield, TorrentFile files, IEnumerable requests ) : void
bitfield BitField
files TorrentFile
requests IEnumerable
Résultat void

PickPiece() public méthode

public PickPiece ( PeerId id, BitField peerBitfield, List otherPeers, int count, int startIndex, int endIndex ) : MessageBundle
id PeerId
peerBitfield BitField
otherPeers List
count int
startIndex int
endIndex int
Résultat OctoTorrent.Client.Messages.MessageBundle

SlidingWindowPicker() public méthode

Empty constructor for changing piece pickers
public SlidingWindowPicker ( OctoTorrent.Client.PiecePicker picker ) : System
picker OctoTorrent.Client.PiecePicker
Résultat System