Documentation ¶
Index ¶
- func GetRequestablePieces(input Input, f func(t *Torrent, p *Piece, pieceIndex int))
- func Run(input Input) map[PeerId]PeerNextRequestState
- type ChunkIndex
- type ChunkSpec
- type ChunksIter
- type ChunksIterFunc
- type ClientPieceOrder
- type Input
- type Peer
- type PeerId
- type PeerNextRequestState
- type Piece
- type Request
- type RequestIndex
- type Torrent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRequestablePieces ¶ added in v1.32.0
Calls f with requestable pieces in order.
func Run ¶
func Run(input Input) map[PeerId]PeerNextRequestState
TODO: We could do metainfo requests here.
Types ¶
type ChunkIndex ¶ added in v1.32.0
type ChunkIndex = uint32
type ChunksIter ¶
type ChunksIter interface {
Iter(func(ChunkIndex))
}
type ChunksIterFunc ¶ added in v1.33.0
type ChunksIterFunc func(func(ChunkIndex))
type ClientPieceOrder ¶
type ClientPieceOrder struct{}
type Peer ¶
type PeerNextRequestState ¶
type RequestIndex ¶ added in v1.32.0
type RequestIndex = uint32
type Torrent ¶
type Torrent struct { Pieces []Piece Capacity storage.TorrentCapacity // Unclosed Peers. Not necessary for getting requestable piece ordering. Peers []Peer // Some value that's unique and stable between runs. Could even use the infohash? InfoHash metainfo.Hash ChunksPerPiece int MaxUnverifiedBytes int64 }
Click to show internal directories.
Click to hide internal directories.