C# Class Universal.Torrent.Client.PiecePicking.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: PiecePicker
Afficher le fichier Open project: haroldma/Universal.Torrent Class Usage Examples

Méthodes publiques

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

Initialises the specified bitfield.

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

Empty constructor for changing piece pickers

Private Methods

Méthode Description
SlidingWindowPicker ( 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 ( 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

Initialises the specified bitfield.
public Initialise ( BitField bitfield, TorrentFile files, IEnumerable requests ) : void
bitfield BitField The bitfield.
files TorrentFile The files.
requests IEnumerable The requests.
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 MessageBundle

SlidingWindowPicker() public méthode

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