outgoinghandshaker

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2021 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 OutgoingHandshaker

type OutgoingHandshaker struct {
	Addr       *net.TCPAddr
	Source     peersource.Source
	Conn       net.Conn
	PeerID     [20]byte
	Extensions [8]byte
	Cipher     mse.CryptoMethod
	Error      error
	// contains filtered or unexported fields
}

OutgoingHandshaker does the BitTorrent handshake on an outgoing connection.

func New

func New(addr *net.TCPAddr, source peersource.Source) *OutgoingHandshaker

New returns a new OutgoingHandshaker for a TCP address.

func (*OutgoingHandshaker) Close

func (h *OutgoingHandshaker) Close()

Close the handshaker.

func (*OutgoingHandshaker) Run

func (h *OutgoingHandshaker) Run(dialTimeout, handshakeTimeout time.Duration, peerID, infoHash [20]byte, resultC chan *OutgoingHandshaker, ourExtensions [8]byte, disableOutgoingEncryption, forceOutgoingEncryption bool)

Run the handshaker.

Jump to

Keyboard shortcuts

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