Comments and update version strings

This commit is contained in:
Matt Joiner 2015-06-28 16:40:46 +10:00
parent 4f293ca75b
commit dd34efad57
2 changed files with 12 additions and 5 deletions

View File

@ -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.

11
misc.go
View File

@ -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
)