From fd34e0a3c14b01616810c8cf4b20e963d1279a70 Mon Sep 17 00:00:00 2001 From: Gleb Sinyavsky Date: Sun, 27 Dec 2015 15:19:39 +0300 Subject: [PATCH] Download.Peers() func added --- download.go | 1 + t.go | 5 +++++ 2 files changed, 6 insertions(+) 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