// WindowUpdateThreshold is the fraction of the receive window that has to be consumed before an higher offset is advertised to the client
constWindowUpdateThreshold=0.25
// MaxIncomingStreams is the maximum number of streams that a peer may open
constMaxIncomingStreams=100
// DefaultMaxIncomingStreams is the maximum number of streams that a peer may open
constDefaultMaxIncomingStreams=100
// DefaultMaxIncomingUniStreams is the maximum number of unidirectional streams that a peer may open
constDefaultMaxIncomingUniStreams=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.
// MaxStreamsMinimumIncrement 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 absolute increment and the procentual increase specified by MaxStreamsMultiplier is used.
constMaxStreamsMinimumIncrement=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
constMaxNewStreamIDDelta=4*MaxIncomingStreams
// MaxSessionUnprocessedPackets is the max number of packets stored in each session that are not yet processed.
returnnil,qerr.Error(qerr.InvalidStreamID,fmt.Sprintf("attempted to open stream %d, which is a lot smaller than the highest opened stream, %d",id,m.highestStreamOpenedByPeer))