peerconn

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

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

func New

func New(conn net.Conn, l logger.Logger, pieceTimeout time.Duration, readBufferSize int) *Conn

func (*Conn) Addr

func (p *Conn) Addr() *net.TCPAddr

func (*Conn) CancelRequest

func (p *Conn) CancelRequest(msg peerprotocol.CancelMessage)

func (*Conn) Close

func (p *Conn) Close()

func (*Conn) CloseConn

func (p *Conn) CloseConn()

func (*Conn) IP

func (p *Conn) IP() string

func (*Conn) Logger

func (p *Conn) Logger() logger.Logger

func (*Conn) Messages

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

func (*Conn) Run

func (p *Conn) Run()

Run reads and processes incoming messages after handshake.

func (*Conn) SendMessage

func (p *Conn) SendMessage(msg peerprotocol.Message)

func (*Conn) SendPiece

func (p *Conn) SendPiece(msg peerprotocol.RequestMessage, pi io.ReaderAt)

func (*Conn) String

func (p *Conn) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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