Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnnounceOpt ¶
type AnnounceRequest ¶
type AnnounceRequest = udp.AnnounceRequest
type AnnounceResponse ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (Client) Announce ¶
func (cl Client) Announce(ctx context.Context, ar AnnounceRequest, opt AnnounceOpt) (ret AnnounceResponse, err error)
type DialContextFunc ¶ added in v1.47.0
type HttpResponse ¶
type HttpResponse struct { FailureReason string `bencode:"failure reason"` Interval int32 `bencode:"interval"` TrackerId string `bencode:"tracker id"` Complete int32 `bencode:"complete"` Incomplete int32 `bencode:"incomplete"` Peers Peers `bencode:"peers"` // BEP 7 Peers6 krpc.CompactIPv6NodeAddrs `bencode:"peers6"` }
type NewClientOpts ¶
type NewClientOpts struct { Proxy ProxyFunc DialContext DialContextFunc ServerName string AllowKeepAlive bool }
type Peer ¶
type Peer struct { IP net.IP `bencode:"ip"` Port int `bencode:"port"` ID []byte `bencode:"peer id"` }
TODO: Use netip.Addr and Option[[20]byte].
func (*Peer) FromDictInterface ¶
Set from the non-compact form in BEP 3.
Click to show internal directories.
Click to hide internal directories.