make use of shorter PublicHeaders when packing a packet

fixes #67
This commit is contained in:
Marten Seemann
2016-05-10 23:17:04 +07:00
parent b05b52a2a8
commit 174095d5aa
3 changed files with 59 additions and 43 deletions

View File

@@ -32,8 +32,8 @@ type ErrorCode uint32
// MaxPacketSize is the maximum packet size, including the public header
const MaxPacketSize = 1452
// MaxFrameSize is the maximum size of a QUIC frame
const MaxFrameSize = MaxPacketSize - (1 + 8 + 6) /*public header*/ - 1 /*private header*/ - 12 /*crypto signature*/
// MaxFrameAndPublicHeaderSize is the maximum size of a QUIC frame plus PublicHeader
const MaxFrameAndPublicHeaderSize = MaxPacketSize - 1 /*private header*/ - 12 /*crypto signature*/
// DefaultTCPMSS is the default maximum packet size used in the Linux TCP implementation.
// Used in QUIC for congestion window computations in bytes.