From: Matt Joiner Date: Sun, 28 Jun 2015 06:40:46 +0000 (+1000) Subject: Comments and update version strings X-Git-Tag: v1.0.0~1137 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=dd34efad57973028aff291a1da3013da55b3af1a;p=btrtrc.git Comments and update version strings --- diff --git a/client.go b/client.go index 3eef1580..e18e60f5 100644 --- a/client.go +++ b/client.go @@ -89,10 +89,14 @@ const ( pruneInterval = 10 * time.Second + // These are our extended message IDs. metadataExtendedId = iota + 1 // 0 is reserved for deleting keys pexExtendedId - extendedHandshakeClientVersion = "go.torrent dev 20140825" + // Updated occasionally to when there's been some changes to client + // behaviour in case other clients are assuming anything of us. See also + // `bep20`. + extendedHandshakeClientVersion = "go.torrent dev 20150624" ) // Currently doesn't really queue, but should in the future. diff --git a/misc.go b/misc.go index 3cf1b8ee..532d4a72 100644 --- a/misc.go +++ b/misc.go @@ -11,10 +11,13 @@ import ( ) const ( - pieceHash = crypto.SHA1 - maxRequests = 250 // Maximum pending requests we allow peers to send us. - chunkSize = 0x4000 // 16KiB - bep20 = "-GT0000-" // Peer ID client identifier prefix + pieceHash = crypto.SHA1 + maxRequests = 250 // Maximum pending requests we allow peers to send us. + chunkSize = 0x4000 // 16KiB + // Peer ID client identifier prefix. We'll update this occasionally to + // reflect changes to client behaviour that other clients may depend on. + // Also see `extendedHandshakeClientVersion`. + bep20 = "-GT0001-" nominalDialTimeout = time.Second * 30 minDialTimeout = 5 * time.Second )