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

Rename getPeers to requestPeers

This commit is contained in:
Jesse Li
2020-01-02 10:32:20 -05:00
parent cc088e8b79
commit 17e57b6dd6
2 changed files with 2 additions and 2 deletions

View File

@@ -44,7 +44,7 @@ func (t *TorrentFile) Download() ([]byte, error) {
return nil, err
}
peers, err := t.getPeers(peerID, Port)
peers, err := t.requestPeers(peerID, Port)
if err != nil {
return nil, err
}

View File

@@ -51,7 +51,7 @@ func (t *TorrentFile) buildTrackerURL(peerID [20]byte, port uint16) (string, err
return base.String(), nil
}
func (t *TorrentFile) getPeers(peerID [20]byte, port uint16) ([]p2p.Peer, error) {
func (t *TorrentFile) requestPeers(peerID [20]byte, port uint16) ([]p2p.Peer, error) {
url, err := t.buildTrackerURL(peerID, port)
if err != nil {
return nil, err