4 pp "github.com/anacrolix/torrent/peer_protocol"
9 type ChunkSpec struct {
10 Begin, Length pp.Integer
18 func (r Request) ToMsg(mt pp.MessageType) pp.Message {
27 // Describes the importance of obtaining a particular piece.
28 type PiecePriority byte
30 func (pp *PiecePriority) Raise(maybe PiecePriority) bool {
38 // Priority for use in PriorityBitmap
39 func (me PiecePriority) BitmapPriority() int {
44 PiecePriorityNone PiecePriority = iota // Not wanted. Must be the zero value.
45 PiecePriorityNormal // Wanted.
46 PiecePriorityHigh // Wanted a lot.
47 PiecePriorityReadahead // May be required soon.
48 // Succeeds a piece where a read occurred. Currently the same as Now,
49 // apparently due to issues with caching.
51 PiecePriorityNow // A Reader is reading in this piece. Highest urgency.