]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Download.Peers() func added
authorGleb Sinyavsky <zhulik.gleb@gmail.com>
Sun, 27 Dec 2015 12:19:39 +0000 (15:19 +0300)
committerGleb Sinyavsky <zhulik.gleb@gmail.com>
Sun, 27 Dec 2015 12:19:39 +0000 (15:19 +0300)
download.go
t.go

index 6e60af07a53c9e301c105ba039398f2d048f6771..171da56c7202fc019f1f6bbced5b501bf07d9cba 100644 (file)
@@ -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 05917e29f4bd6bc27c7e2b82e2bca9e2488b7c61..9d2e7d1bc6777664cd096a4a009c52297e77885d 100644 (file)
--- 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