piecepicker

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PiecePicker

type PiecePicker struct {
	// contains filtered or unexported fields
}

func New

func New(pieces []piece.Piece, maxDuplicateDownload int) *PiecePicker

func (*PiecePicker) Available

func (p *PiecePicker) Available() uint32

func (*PiecePicker) HandleAllowedFast

func (p *PiecePicker) HandleAllowedFast(pe *peer.Peer, i uint32)

func (*PiecePicker) HandleCancelDownload

func (p *PiecePicker) HandleCancelDownload(pe *peer.Peer, i uint32)

func (*PiecePicker) HandleChoke added in v0.3.0

func (p *PiecePicker) HandleChoke(pe *peer.Peer, i uint32)

func (*PiecePicker) HandleDisconnect

func (p *PiecePicker) HandleDisconnect(pe *peer.Peer)

func (*PiecePicker) HandleHave

func (p *PiecePicker) HandleHave(pe *peer.Peer, i uint32)

func (*PiecePicker) HandleSnubbed

func (p *PiecePicker) HandleSnubbed(pe *peer.Peer, i uint32)

func (*PiecePicker) HandleUnchoke added in v0.3.0

func (p *PiecePicker) HandleUnchoke(pe *peer.Peer, i uint32)

func (*PiecePicker) PickFor added in v0.3.0

func (p *PiecePicker) PickFor(pe *peer.Peer) (pp *piece.Piece, allowedFast bool)

func (*PiecePicker) RequestedPeers

func (p *PiecePicker) RequestedPeers(i uint32) []*peer.Peer

Jump to

Keyboard shortcuts

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