Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPTracker ¶
type HTTPTracker struct {
// contains filtered or unexported fields
}
HTTPTracker is a torrent tracker that talks HTTP.
func New ¶
func New(rawURL string, u *url.URL, timeout time.Duration, t *http.Transport, userAgent string, maxResponseLength int64) *HTTPTracker
New returns a new HTTPTracker.
func (*HTTPTracker) Announce ¶
func (t *HTTPTracker) Announce(ctx context.Context, req tracker.AnnounceRequest) (*tracker.AnnounceResponse, error)
Announce the torrent by doing a GET request to the tracker.
func (*HTTPTracker) URL ¶
func (t *HTTPTracker) URL() string
URL returns the URL string of the tracker.
type StatusError ¶ added in v0.9.0
StatusError is returned from HTTP tracker announces when the response code is not 200 OK.
func (*StatusError) Error ¶ added in v0.9.0
func (e *StatusError) Error() string
Click to show internal directories.
Click to hide internal directories.