types

package
v1.54.2-alpha-8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2024 License: MPL-2.0 Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChunkSpec

type ChunkSpec struct {
	Begin, Length pp.Integer
}

type PeerID added in v1.48.0

type PeerID [20]byte

Peer client ID.

type PieceIndex

type PieceIndex = int

type PiecePriority

type PiecePriority byte

Describes the importance of obtaining a particular piece.

const (
	PiecePriorityNone      PiecePriority = iota // Not wanted. Must be the zero value.
	PiecePriorityNormal                         // Wanted.
	PiecePriorityHigh                           // Wanted a lot.
	PiecePriorityReadahead                      // May be required soon.
	// Succeeds a piece where a read occurred. Currently the same as Now,
	// apparently due to issues with caching.
	PiecePriorityNext
	PiecePriorityNow // A Reader is reading in this piece. Highest urgency.
)

func (PiecePriority) BitmapPriority

func (me PiecePriority) BitmapPriority() int

Priority for use in PriorityBitmap

func (*PiecePriority) Raise

func (pp *PiecePriority) Raise(maybe PiecePriority) bool

type Request

type Request struct {
	Index pp.Integer
	ChunkSpec
}

func (Request) ToMsg

func (r Request) ToMsg(mt pp.MessageType) pp.Message

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL