2
0
mirror of synced 2025-02-23 14:18:13 +00:00

Download.Peers() func added

This commit is contained in:
Gleb Sinyavsky 2015-12-27 15:19:39 +03:00
parent 052a899f60
commit fd34e0a3c1
2 changed files with 6 additions and 0 deletions

View File

@ -23,4 +23,5 @@ type Download interface {
DownloadAll()
Trackers() [][]tracker.Client
Files() (ret []File)
Peers() map[peersKey]Peer
}

5
t.go
View File

@ -101,4 +101,9 @@ func (t Torrent) Client() *Client {
// Trackers returns torrent's trackers
func (t Torrent) Trackers() [][]tracker.Client {
return t.torrent.Trackers
}
// Peers returns torrent's peers
func (t Torrent) Peers() map[peersKey]Peer {
return t.torrent.Peers
}