forked from quic-go/quic-go
use the same default max flow control window sizes for client and server
This commit is contained in:
@@ -205,11 +205,11 @@ func populateClientConfig(config *Config, createdPacketConn bool) *Config {
|
|||||||
|
|
||||||
maxReceiveStreamFlowControlWindow := config.MaxReceiveStreamFlowControlWindow
|
maxReceiveStreamFlowControlWindow := config.MaxReceiveStreamFlowControlWindow
|
||||||
if maxReceiveStreamFlowControlWindow == 0 {
|
if maxReceiveStreamFlowControlWindow == 0 {
|
||||||
maxReceiveStreamFlowControlWindow = protocol.DefaultMaxReceiveStreamFlowControlWindowClient
|
maxReceiveStreamFlowControlWindow = protocol.DefaultMaxReceiveStreamFlowControlWindow
|
||||||
}
|
}
|
||||||
maxReceiveConnectionFlowControlWindow := config.MaxReceiveConnectionFlowControlWindow
|
maxReceiveConnectionFlowControlWindow := config.MaxReceiveConnectionFlowControlWindow
|
||||||
if maxReceiveConnectionFlowControlWindow == 0 {
|
if maxReceiveConnectionFlowControlWindow == 0 {
|
||||||
maxReceiveConnectionFlowControlWindow = protocol.DefaultMaxReceiveConnectionFlowControlWindowClient
|
maxReceiveConnectionFlowControlWindow = protocol.DefaultMaxReceiveConnectionFlowControlWindow
|
||||||
}
|
}
|
||||||
maxIncomingStreams := config.MaxIncomingStreams
|
maxIncomingStreams := config.MaxIncomingStreams
|
||||||
if maxIncomingStreams == 0 {
|
if maxIncomingStreams == 0 {
|
||||||
|
|||||||
@@ -32,21 +32,13 @@ const InitialMaxStreamData = (1 << 10) * 32 // 32 kB
|
|||||||
// This is the value that Google servers are using
|
// This is the value that Google servers are using
|
||||||
const InitialMaxData = (1 << 10) * 48 // 48 kB
|
const InitialMaxData = (1 << 10) * 48 // 48 kB
|
||||||
|
|
||||||
// DefaultMaxReceiveStreamFlowControlWindowServer 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, for the server
|
||||||
// This is the value that Google servers are using
|
// This is the value that Google servers are using
|
||||||
const DefaultMaxReceiveStreamFlowControlWindowServer = 1 * (1 << 20) // 1 MB
|
const DefaultMaxReceiveStreamFlowControlWindow = 6 * (1 << 20) // 6 MB
|
||||||
|
|
||||||
// DefaultMaxReceiveConnectionFlowControlWindowServer is the default connection-level flow control window for receiving data, for the server
|
// DefaultMaxReceiveConnectionFlowControlWindow is the default connection-level flow control window for receiving data, for the server
|
||||||
// This is the value that Google servers are using
|
// This is the value that Google servers are using
|
||||||
const DefaultMaxReceiveConnectionFlowControlWindowServer = 1.5 * (1 << 20) // 1.5 MB
|
const DefaultMaxReceiveConnectionFlowControlWindow = 15 * (1 << 20) // 12 MB
|
||||||
|
|
||||||
// DefaultMaxReceiveStreamFlowControlWindowClient is the default maximum stream-level flow control window for receiving data, for the client
|
|
||||||
// This is the value that Chromium is using
|
|
||||||
const DefaultMaxReceiveStreamFlowControlWindowClient = 6 * (1 << 20) // 6 MB
|
|
||||||
|
|
||||||
// DefaultMaxReceiveConnectionFlowControlWindowClient is the default connection-level flow control window for receiving data, for the client
|
|
||||||
// This is the value that Google servers are using
|
|
||||||
const DefaultMaxReceiveConnectionFlowControlWindowClient = 15 * (1 << 20) // 15 MB
|
|
||||||
|
|
||||||
// ConnectionFlowControlMultiplier determines how much larger the connection flow control windows needs to be relative to any stream's flow control window
|
// ConnectionFlowControlMultiplier determines how much larger the connection flow control windows needs to be relative to any stream's flow control window
|
||||||
// This is the value that Chromium is using
|
// This is the value that Chromium is using
|
||||||
|
|||||||
@@ -205,11 +205,11 @@ func populateServerConfig(config *Config) *Config {
|
|||||||
|
|
||||||
maxReceiveStreamFlowControlWindow := config.MaxReceiveStreamFlowControlWindow
|
maxReceiveStreamFlowControlWindow := config.MaxReceiveStreamFlowControlWindow
|
||||||
if maxReceiveStreamFlowControlWindow == 0 {
|
if maxReceiveStreamFlowControlWindow == 0 {
|
||||||
maxReceiveStreamFlowControlWindow = protocol.DefaultMaxReceiveStreamFlowControlWindowServer
|
maxReceiveStreamFlowControlWindow = protocol.DefaultMaxReceiveStreamFlowControlWindow
|
||||||
}
|
}
|
||||||
maxReceiveConnectionFlowControlWindow := config.MaxReceiveConnectionFlowControlWindow
|
maxReceiveConnectionFlowControlWindow := config.MaxReceiveConnectionFlowControlWindow
|
||||||
if maxReceiveConnectionFlowControlWindow == 0 {
|
if maxReceiveConnectionFlowControlWindow == 0 {
|
||||||
maxReceiveConnectionFlowControlWindow = protocol.DefaultMaxReceiveConnectionFlowControlWindowServer
|
maxReceiveConnectionFlowControlWindow = protocol.DefaultMaxReceiveConnectionFlowControlWindow
|
||||||
}
|
}
|
||||||
maxIncomingStreams := config.MaxIncomingStreams
|
maxIncomingStreams := config.MaxIncomingStreams
|
||||||
if maxIncomingStreams == 0 {
|
if maxIncomingStreams == 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user