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
ファイルを表示 Open project: Eskat0n/OctoTorrent

Public Methods

Method 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

Method 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 method

public Initialise ( BitField bitfield, TorrentFile files, IEnumerable requests ) : void
bitfield BitField
files TorrentFile
requests IEnumerable
return void

PickPiece() public method

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
return OctoTorrent.Client.Messages.MessageBundle

SlidingWindowPicker() public method

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