1
0
mirror of https://github.com/veggiedefender/torrent-client.git synced 2025-11-06 09:29:16 +02:00

Implement formatting requests and parsing pieces

This commit is contained in:
Jesse
2019-12-23 12:56:11 -05:00
parent 7999e23fe1
commit cdfb02a591
5 changed files with 181 additions and 18 deletions

View File

@@ -46,8 +46,8 @@ func (t *Torrent) Download() error {
}
// peers, err := t.getPeers(peerID, Port)
// fmt.Println(peers)
peers := []p2p.Peer{{IP: net.IP{127, 0, 0, 1}, Port: 51413}}
fmt.Println(peers[:1])
downloader := p2p.Downloader{
Peers: peers,
PeerID: peerID,