forked from quic-go/quic-go
make the number of incoming streams configurable, for IETF QUIC
This commit is contained in:
@@ -3,7 +3,6 @@ package handshake
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/qerr"
|
||||
|
||||
@@ -121,8 +120,6 @@ func (h *extensionHandlerClient) Receive(hType mint.HandshakeType, el *mint.Exte
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// TODO(#878): remove this when implementing the MAX_STREAM_ID frame
|
||||
params.MaxStreams = math.MaxUint32
|
||||
h.paramsChan <- *params
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -59,8 +59,11 @@ const ConnectionFlowControlMultiplier = 1.5
|
||||
// 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
|
||||
|
||||
// MaxIncomingStreams is the maximum number of streams that a peer may open
|
||||
const MaxIncomingStreams = 100
|
||||
// DefaultMaxIncomingStreams is the maximum number of streams that a peer may open
|
||||
const DefaultMaxIncomingStreams = 100
|
||||
|
||||
// DefaultMaxIncomingUniStreams is the maximum number of unidirectional streams that a peer may open
|
||||
const DefaultMaxIncomingUniStreams = 100
|
||||
|
||||
// MaxStreamsMultiplier is the slack the client is allowed for the maximum number of streams per connection, needed e.g. when packets are out of order or dropped. The minimum of this procentual increase and the absolute increment specified by MaxStreamsMinimumIncrement is used.
|
||||
const MaxStreamsMultiplier = 1.1
|
||||
@@ -70,7 +73,7 @@ const MaxStreamsMinimumIncrement = 10
|
||||
|
||||
// MaxNewStreamIDDelta is the maximum difference between and a newly opened Stream and the highest StreamID that a client has ever opened
|
||||
// note that the number of streams is half this value, since the client can only open streams with open StreamID
|
||||
const MaxNewStreamIDDelta = 4 * MaxIncomingStreams
|
||||
const MaxNewStreamIDDelta = 4 * DefaultMaxIncomingStreams
|
||||
|
||||
// MaxSessionUnprocessedPackets is the max number of packets stored in each session that are not yet processed.
|
||||
const MaxSessionUnprocessedPackets = DefaultMaxCongestionWindow
|
||||
|
||||
Reference in New Issue
Block a user