peerreader

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxBlockSize = 16 * 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PeerReader

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

func New

func New(conn net.Conn, l logger.Logger, pieceTimeout time.Duration, b *ratelimit.Bucket) *PeerReader

func (*PeerReader) Done

func (p *PeerReader) Done() chan struct{}

func (*PeerReader) Messages

func (p *PeerReader) Messages() <-chan interface{}

func (*PeerReader) Run

func (p *PeerReader) Run()

func (*PeerReader) Stop

func (p *PeerReader) Stop()

type Piece

type Piece struct {
	peerprotocol.PieceMessage
	Buffer bufferpool.Buffer
}

Jump to

Keyboard shortcuts

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