From be4dc49114bf012adcb59660b581531bee709f45 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Mon, 1 Mar 2021 11:31:57 +0800 Subject: [PATCH 1/2] fix documentation of the default MaxReceiveStreamFlowControlWindow --- interface.go | 2 +- internal/protocol/params.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interface.go b/interface.go index eedb18fc3..681b35d42 100644 --- a/interface.go +++ b/interface.go @@ -246,7 +246,7 @@ type Config struct { // otherwise the token is associated with the server's IP address. TokenStore TokenStore // MaxReceiveStreamFlowControlWindow is the maximum stream-level flow control window for receiving data. - // If this value is zero, it will default to 1 MB for the server and 6 MB for the client. + // If this value is zero, it will default to 6 MB. MaxReceiveStreamFlowControlWindow uint64 // MaxReceiveConnectionFlowControlWindow is the connection-level flow control window for receiving data. // If this value is zero, it will default to 1.5 MB for the server and 15 MB for the client. diff --git a/internal/protocol/params.go b/internal/protocol/params.go index 4f52709f7..b94f2062e 100644 --- a/internal/protocol/params.go +++ b/internal/protocol/params.go @@ -27,7 +27,7 @@ const InitialMaxStreamData = (1 << 10) * 512 // 512 kb // InitialMaxData is the connection-level flow control window for receiving data const InitialMaxData = ConnectionFlowControlMultiplier * InitialMaxStreamData -// DefaultMaxReceiveStreamFlowControlWindow is the default maximum stream-level flow control window for receiving data, for the server +// DefaultMaxReceiveStreamFlowControlWindow is the default maximum stream-level flow control window for receiving data const DefaultMaxReceiveStreamFlowControlWindow = 6 * (1 << 20) // 6 MB // DefaultMaxReceiveConnectionFlowControlWindow is the default connection-level flow control window for receiving data, for the server From 3e8e6b2e36d239233ea54212d6ae11cfd99f26a2 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Mon, 1 Mar 2021 11:33:42 +0800 Subject: [PATCH 2/2] fix documentation of the default MaxReceiveConnectionFlowControlWindow --- interface.go | 2 +- internal/protocol/params.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/interface.go b/interface.go index 681b35d42..91e36260d 100644 --- a/interface.go +++ b/interface.go @@ -249,7 +249,7 @@ type Config struct { // If this value is zero, it will default to 6 MB. MaxReceiveStreamFlowControlWindow uint64 // MaxReceiveConnectionFlowControlWindow is the connection-level flow control window for receiving data. - // If this value is zero, it will default to 1.5 MB for the server and 15 MB for the client. + // If this value is zero, it will default to 15 MB. MaxReceiveConnectionFlowControlWindow uint64 // MaxIncomingStreams is the maximum number of concurrent bidirectional streams that a peer is allowed to open. // Values above 2^60 are invalid. diff --git a/internal/protocol/params.go b/internal/protocol/params.go index b94f2062e..2f0803202 100644 --- a/internal/protocol/params.go +++ b/internal/protocol/params.go @@ -30,8 +30,8 @@ const InitialMaxData = ConnectionFlowControlMultiplier * InitialMaxStreamData // DefaultMaxReceiveStreamFlowControlWindow is the default maximum stream-level flow control window for receiving data const DefaultMaxReceiveStreamFlowControlWindow = 6 * (1 << 20) // 6 MB -// DefaultMaxReceiveConnectionFlowControlWindow is the default connection-level flow control window for receiving data, for the server -const DefaultMaxReceiveConnectionFlowControlWindow = 15 * (1 << 20) // 12 MB +// DefaultMaxReceiveConnectionFlowControlWindow is the default connection-level flow control window for receiving data +const DefaultMaxReceiveConnectionFlowControlWindow = 15 * (1 << 20) // 15 MB // WindowUpdateThreshold is the fraction of the receive window that has to be consumed before an higher offset is advertised to the client const WindowUpdateThreshold = 0.25