Documentation
¶
Index ¶
Constants ¶
View Source
const ( InitialPacketNumberMin = 0 // 2^32-1025 InitialPacketNumberMax = 4294966271 )
TODO: will be deprecated
View Source
const ( BidirectionalStream = 0x0 UnidirectionalStream = 0x2 )
View Source
const AckDelayDefault = 8 // 2 ^ 3
View Source
const AckDelayExponentDefault = 3
View Source
const ConnectionIDLen = 18
View Source
const ConnectionIDLenMax = 18
View Source
const HighPriorityWireSizeThreshold = MaxPayloadSizeIPv4 * 0.8
View Source
const MTUIPv4 = 1252
MTU for IPv4 packet
View Source
const MTUIPv6 = 1232
MTU for IPv6 packet
View Source
const MaxHeaderSize = 54
Long header's maximum size is 1+4+1+18+18+8+4=54
View Source
const MaxPacketNumber = 4611686018427387903
2^62 - 1
View Source
const MaxPayloadSizeIPv4 = MTUIPv4 - MaxHeaderSize
View Source
const MaxPayloadSizeIPv6 = MTUIPv6 - MaxHeaderSize
View Source
const MaxQuicInt = 4611686018427387903
View Source
const PacketNumberIncreaseSize = 1
Variables ¶
View Source
var SupportedVersions = []Version{VersionQuicTLS, VersionPlaceholder}
Functions ¶
This section is empty.
Types ¶
type ConnectionID ¶
type ConnectionID []byte
func NewConnectionID ¶
func NewConnectionID(data []byte) (ConnectionID, error)
func ReadConnectionID ¶
func ReadConnectionID(data []byte, length int) (ConnectionID, error)
func (ConnectionID) Bytes ¶
func (c ConnectionID) Bytes() []byte
func (ConnectionID) Equal ¶
func (cleft ConnectionID) Equal(cright ConnectionID) bool
func (ConnectionID) String ¶
func (c ConnectionID) String() string
type PacketNumber ¶
type PacketNumber uint32
const InitialPacketNumber PacketNumber = 0
func DecodePacketNumber ¶
func DecodePacketNumber(data []byte) PacketNumber
func (PacketNumber) GetByteLen ¶
func (pn PacketNumber) GetByteLen() int
func (PacketNumber) GetEncoded ¶
func (pn PacketNumber) GetEncoded() uint32
func (*PacketNumber) Increase ¶
func (pn *PacketNumber) Increase() PacketNumber
func (PacketNumber) PutWire ¶
func (pn PacketNumber) PutWire(wire []byte) int
type QuicInt ¶
type QuicInt uint64
func DecodeQuicInt ¶
func (QuicInt) GetByteLen ¶
func (QuicInt) GetEncoded ¶
type StreamState ¶
type StreamState uint8
const ( StreamReady StreamState = iota StreamRecv StreamSend StreamDataSent StreamSizeKnown StreamDataRecvd StreamDataRead StreamResetSent StreamResetRecvd StreamResetRead StreamOpen StreamIdle StreamClosed StreamHalfClosed )
func (StreamState) String ¶
func (s StreamState) String() string
Click to show internal directories.
Click to hide internal directories.