mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-18 14:23:42 +00:00
feat: peer wire protocol实现
This commit is contained in:
1 parent
7bb3e38b21
commit
ee4ff7dd8b
13 files changed
+212
-165
No files matched your search
@@ -101,10 +101,7 @@ func getUsablePeerMore() chan *peerConn {
|
||||
PeerID: torrent.PeerID,
|
||||
MetaInfo: torrent.MetaInfo,
|
||||
}
|
||||
peers, err := tracker.Tracker()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
peers := <-tracker.Tracker()
|
||||
ch := make(chan *peerConn)
|
||||
for i := range peers {
|
||||
go peerTest(torrent, &peers[i], ch)
|
||||
@@ -162,5 +159,4 @@ func TestSome2(t *testing.T) {
|
||||
}(i)
|
||||
}
|
||||
wg.Wait()
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user