split protocol constants into protocol and server parameters

This commit is contained in:
Marten Seemann
2016-05-14 15:15:52 +07:00
parent 9abda1c91f
commit ea22fa6346
2 changed files with 25 additions and 22 deletions

View File

@@ -1,7 +1,5 @@
package protocol
import "time"
// A PacketNumber in QUIC
type PacketNumber uint64
@@ -43,24 +41,4 @@ const MaxFrameAndPublicHeaderSize = MaxPacketSize - 1 /*private header*/ - 12 /*
// Used in QUIC for congestion window computations in bytes.
const DefaultTCPMSS ByteCount = 1460
// InitialCongestionWindow is the initial congestion window in QUIC packets
const InitialCongestionWindow PacketNumber = 32
// MaxCongestionWindow is the maximum size of the CWND, in packets.
// TODO: Unused?
const MaxCongestionWindow PacketNumber = 200
// DefaultMaxCongestionWindow is the default for the max congestion window
// Taken from Chrome
const DefaultMaxCongestionWindow PacketNumber = 107
// MaxUndecryptablePackets limits the number of undecryptable packets that a
// session queues for later until it sends a public reset.
const MaxUndecryptablePackets = 10
// SmallPacketPayloadSizeThreshold defines a threshold for small packets
// if the packet payload size (i.e. the packet without public header and private header) is below SmallPacketSizeThreshold, sending will be delayed by SmallPacketSendDelay
const SmallPacketPayloadSizeThreshold = MaxPacketSize / 2
// SmallPacketSendDelay is the time delay applied to small packets
const SmallPacketSendDelay = 500 * time.Microsecond