Versions in this module Expand all Collapse all v1 v1.1.0 Aug 22, 2024 Changes in this version + type AnnounceOpt struct + ClientIp4 net.IP + ClientIp6 net.IP + HostHeader string + HttpRequestDirector func(*http.Request) error + UserAgent string + type AnnounceRequest = udp.AnnounceRequest + type AnnounceResponse struct + Interval int32 + Leechers int32 + Peers []Peer + Seeders int32 + type Client struct + func NewClient(url_ *url.URL, opts NewClientOpts) Client + func (cl Client) Announce(ctx context.Context, ar AnnounceRequest, opt AnnounceOpt) (ret AnnounceResponse, err error) + func (cl Client) Close() error + func (cl Client) Scrape(ctx context.Context, ihs []infohash.T) (out udp.ScrapeResponse, err error) + type DialContextFunc func(ctx context.Context, network, addr string) (net.Conn, error) + type HttpResponse struct + Complete int32 + FailureReason string + Incomplete int32 + Interval int32 + Peers Peers + Peers6 krpc.CompactIPv6NodeAddrs + TrackerId string + type NewClientOpts struct + AllowKeepAlive bool + DialContext DialContextFunc + Proxy ProxyFunc + ServerName string + type Peer struct + ID []byte + IP net.IP + Port int + func (p *Peer) FromDictInterface(d map[string]interface{}) + func (p Peer) FromNodeAddr(na krpc.NodeAddr) Peer + func (p Peer) String() string + func (p Peer) ToNetipAddrPort() (addrPort netip.AddrPort, ok bool) + type Peers struct + Compact bool + List []Peer + func (me *Peers) UnmarshalBencode(b []byte) (err error) + func (me Peers) MarshalBencode() ([]byte, error) + type ProxyFunc func(*http.Request) (*url.URL, error)