Documentation
¶
Overview ¶
Package dht provides Go bindings for libdht, a library implementing the BitTorrent DHT.
Index ¶
- func Announce(id []byte, ipv6 bool, port uint16) error
- func Available() bool
- func Count() (good4 int, good6 int, dubious4 int, dubious6 int, incoming4 int, incoming6 int)
- func DHT(ctx context.Context, myid []byte, port uint16) (<-chan Event, error)
- func GetNodes() ([]netip.AddrPort, error)
- func Ping(addr netip.AddrPort) error
- type Event
- type ValueEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Available ¶
func Available() bool
Available returns true if the DHT is available in this build.
Types ¶
type Event ¶
type Event interface { }
Event is the common interface for all events returned by the DHT.
type ValueEvent ¶
A ValueEvent is returned by the DHT when values become available.
Click to show internal directories.
Click to hide internal directories.