From: Gleb Sinyavsky Date: Sun, 27 Dec 2015 12:19:39 +0000 (+0300) Subject: Download.Peers() func added X-Git-Tag: v1.0.0~947^2~3 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=fd34e0a3c14b01616810c8cf4b20e963d1279a70;p=btrtrc.git Download.Peers() func added --- diff --git a/download.go b/download.go index 6e60af07..171da56c 100644 --- a/download.go +++ b/download.go @@ -23,4 +23,5 @@ type Download interface { DownloadAll() Trackers() [][]tracker.Client Files() (ret []File) + Peers() map[peersKey]Peer } \ No newline at end of file diff --git a/t.go b/t.go index 05917e29..9d2e7d1b 100644 --- a/t.go +++ b/t.go @@ -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 } \ No newline at end of file