implement parsing and writing of the new STREAM frames

This commit is contained in:
Marten Seemann 2017-11-17 07:12:39 -08:00
parent 1a515d1371
commit 11f746a183
14 changed files with 1015 additions and 601 deletions

View file

@ -2,7 +2,6 @@ package protocol
import (
"fmt"
"math"
)
// A PacketNumber in QUIC
@ -57,13 +56,13 @@ func (t PacketType) String() string {
type ConnectionID uint64
// A StreamID in QUIC
type StreamID uint32
type StreamID uint64
// A ByteCount in QUIC
type ByteCount uint64
// MaxByteCount is the maximum value of a ByteCount
const MaxByteCount = ByteCount(math.MaxUint64)
const MaxByteCount = ByteCount(1<<62 - 1)
// MaxReceivePacketSize maximum packet size of any QUIC packet, based on
// ethernet's max size, minus the IP and UDP headers. IPv6 has a 40 byte header,