mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-17 22:03:41 +00:00
Bitfield msg decode
This commit is contained in:
1 parent
dbc58a209d
commit
b7347459eb
7 files changed
+181
-40
No files matched your search
+15
-1
@@ -6,5 +6,19 @@ import (
|
||||
|
||||
func TestClient_AddTorrent(t *testing.T) {
|
||||
client := NewClient()
|
||||
client.AddTorrent("testdata/Game.of.Thrones.S08E05.720p.WEB.H264-MEMENTO.torrent")
|
||||
metaInfo, err := ParseFromFile("testdata/Game.of.Thrones.S08E05.720p.WEB.H264-MEMENTO.torrent")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
torrent := &Torrent{
|
||||
client: client,
|
||||
MetaInfo: metaInfo,
|
||||
}
|
||||
torrent.MetaInfo.Announce = "udp://tracker.opentrackr.org:1337/announce"
|
||||
torrent.MetaInfo.AnnounceList = [][]string{}
|
||||
err = torrent.Tracker()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
return
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user