]> Sergey Matveev's repositories - btrtrc.git/blobdiff - sources.go
Ability to override fifos/
[btrtrc.git] / sources.go
index 4fd44673e41b2cc0c5e0ae2122dbef43db17c7e7..3923e8e6aa4f0149bc4365ad1feb948f6912190c 100644 (file)
@@ -6,11 +6,14 @@ import (
        "net/http"
 
        "github.com/anacrolix/log"
+
        "github.com/anacrolix/torrent/bencode"
        "github.com/anacrolix/torrent/metainfo"
 )
 
-func (t *Torrent) useSources(sources []string) {
+// Add HTTP endpoints that serve the metainfo. They will be used if the torrent info isn't obtained
+// yet. The Client HTTP client is used.
+func (t *Torrent) UseSources(sources []string) {
        select {
        case <-t.Closed():
                return