MSE support

This commit is contained in:
liwei committed 2019-05-31 18:29:04 +08:00
1 parent 03fbdcda60
commit dbc58a209d
11 files changed
+309 -343

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
package bt
import (
"fmt"
)
type Torrent struct {
client *Client
MetaInfo *MetaInfo
Peers []Peer
}
func (torrent *Torrent) Download() {
t := NewTracker(torrent)
peers, err := t.Tracker()
if err != nil {
fmt.Println(err)
return
}
peers[0].Torrent = torrent
peers[0].DoDownload()
}