go.crypto/ssh: Increase window size.

Increase window size for channels (session and tcpip) to 64 *
max packet size (32 KB), which is the same value that OpenSSH
uses. Also breaks out the relevant harcoded constants into named
constants in channel.go.

Fixes golang/go#6675.

R=golang-dev, dave, hanwen, agl
CC=golang-dev
https://golang.org/cl/18120043
This commit is contained in:
Jakob Borg
2013-11-01 04:24:39 +11:00
committed by Dave Cheney
parent 577ae2abf9
commit 4758fe8ce4
4 changed files with 14 additions and 10 deletions
+6
View File
@@ -22,6 +22,12 @@ const (
// minPacketLength defines the smallest valid packet
minPacketLength = 9
// channelMaxPacketSize defines the maximum packet size advertised in open messages
channelMaxPacketSize = 1 << 15 // RFC 4253 6.1, minimum 32 KiB
// channelWindowSize defines the window size advertised in open messages
channelWindowSize = 64 * channelMaxPacketSize // Like OpenSSH
)
// A Channel is an ordered, reliable, duplex stream that is multiplexed over an