From 83045db3e5d14f3accbb463164df74e4b1d7e19e Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sat, 12 Dec 2015 14:00:07 +1100 Subject: [PATCH] Docs --- t.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/t.go b/t.go index 5abb9169..ae1e1b87 100644 --- a/t.go +++ b/t.go @@ -71,10 +71,14 @@ func (t Torrent) BytesCompleted() int64 { return t.bytesCompleted() } +// The subscription emits as (int) the index of pieces as their state changes. +// A state change is when the PieceState for a piece alters in value. func (t Torrent) SubscribePieceStateChanges() *pubsub.Subscription { return t.torrent.pieceStateChanges.Subscribe() } +// Returns true if the torrent is currently being seeded. This occurs when the +// client is willing to upload without wanting anything in return. func (t Torrent) Seeding() bool { t.cl.mu.Lock() defer t.cl.mu.Unlock()