]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Add comments to some ClientConfig fields
authorMatt Joiner <anacrolix@gmail.com>
Mon, 3 Sep 2018 01:48:11 +0000 (11:48 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Mon, 3 Sep 2018 01:48:11 +0000 (11:48 +1000)
config.go

index 72db36eb5227f34d2150f616ea410538e5dd37ea..117f640aa7007c6d88bf3f2d29026e995d4bcda6 100644 (file)
--- a/config.go
+++ b/config.go
@@ -98,19 +98,25 @@ type ClientConfig struct {
        MinDialTimeout             time.Duration
        EstablishedConnsPerTorrent int
        HalfOpenConnsPerTorrent    int
-       TorrentPeersHighWater      int
-       TorrentPeersLowWater       int
+       // Maximum number of peer addresses in reserve.
+       TorrentPeersHighWater int
+       // Minumum number of peers before effort is made to obtain more peers.
+       TorrentPeersLowWater int
 
        // Limit how long handshake can take. This is to reduce the lingering
        // impact of a few bad apples. 4s loses 1% of successful handshakes that
        // are obtained with 60s timeout, and 5% of unsuccessful handshakes.
        HandshakesTimeout time.Duration
 
+       // The IP addresses as our peers should see them. May differ from the
+       // local interfaces due to NAT or other network configurations.
        PublicIp4 net.IP
        PublicIp6 net.IP
 
        DisableAcceptRateLimiting bool
-       dropDuplicatePeerIds      bool
+       // Don't add connections that have the same peer ID as an existing
+       // connection for a given Torrent.
+       dropDuplicatePeerIds bool
 }
 
 func (cfg *ClientConfig) SetListenAddr(addr string) *ClientConfig {