]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Docs
authorMatt Joiner <anacrolix@gmail.com>
Sat, 12 Dec 2015 03:00:07 +0000 (14:00 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Sat, 12 Dec 2015 03:00:07 +0000 (14:00 +1100)
t.go

diff --git a/t.go b/t.go
index 5abb91697ae661e47602c9d68288cb7edd62c8f7..ae1e1b87a49ef6aedb50dc6807120d07c444ce88 100644 (file)
--- 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()