godht

package
v0.0.0-...-e0770a4 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BootstrapNodes = []string{
	"router.bittorrent.com:6881",
	"dht.transmissionbt.com:6881",
	"router.utorrent.com:6881",
}

Functions

func Bootstraps

func Bootstraps(addr []string) option

func LocalID

func LocalID(id []byte) option

func MaxFriendsPerSec

func MaxFriendsPerSec(n int) option

func Secret

func Secret(s string) option

Types

type Announce

type Announce struct {
	Raw         map[string]interface{}
	From        *net.UDPAddr
	Peer        *net.TCPAddr
	Infohash    []byte
	InfohashHex string
}

type GoDHT

type GoDHT struct {
	Announce chan *Announce
	// contains filtered or unexported fields
}

func New

func New(laddr string, options ...option) (*GoDHT, error)

Jump to

Keyboard shortcuts

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