udptracker

package
v1.6.1-0...-b16536f Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transport

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

Transport for UDP tracker implementation.

func NewTransport

func NewTransport(bl *blocklist.Blocklist, dnsTimeout time.Duration) *Transport

NewTransport returns a new UDP tracker transport.

func (*Transport) Close

func (t *Transport) Close() error

Close the tracker connection.

func (*Transport) Do

func (t *Transport) Do(ctx context.Context, trx *transaction) ([]byte, error)

Do sends the transaction to the tracker. Retries on failure.

type UDPTracker

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

UDPTracker is a torrent tracker that speaks UDP.

func New

func New(rawURL string, u *url.URL, t *Transport) *UDPTracker

New returns a new UDPTracker.

func (*UDPTracker) Announce

Announce the torrent to UDP tracker.

func (*UDPTracker) URL

func (t *UDPTracker) URL() string

URL returns the URL string.

Jump to

Keyboard shortcuts

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