2020-04-06 13:38:01 +08:00
|
|
|
package torrent
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"net/url"
|
2020-04-06 14:45:47 +08:00
|
|
|
|
|
|
|
"github.com/anacrolix/torrent/webtorrent"
|
2020-04-06 13:38:01 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
type websocketTracker struct {
|
|
|
|
url url.URL
|
2020-04-13 12:31:39 +08:00
|
|
|
*webtorrent.TrackerClient
|
2020-04-06 13:38:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (me websocketTracker) statusLine() string {
|
|
|
|
return fmt.Sprintf("%q", me.url.String())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (me websocketTracker) URL() url.URL {
|
|
|
|
return me.url
|
|
|
|
}
|