qtype

package
v0.0.0-...-2c9eac5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2018 License: MIT Imports: 5 Imported by: 1

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

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 DecodeQuicInt(data []byte) QuicInt

func (QuicInt) GetByteLen

func (v QuicInt) GetByteLen() int

func (QuicInt) GetEncoded

func (v QuicInt) GetEncoded() uint64

func (QuicInt) GetFlag

func (v QuicInt) GetFlag() byte

func (QuicInt) PutWire

func (v QuicInt) PutWire(wire []byte) int

type StreamID

type StreamID QuicInt

func (*StreamID) Increment

func (s *StreamID) Increment()

func (StreamID) PutWire

func (s StreamID) PutWire(wire []byte) int

func (StreamID) String

func (s StreamID) String() string

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

type TokenInfo

type TokenInfo struct {
	Addr  string // ipv4 for now
	Iface string
	Raw   []byte //token
}

type Version

type Version uint32
const (
	VersionPlaceholder     Version = math.MaxUint32
	VersionQuicTLS         Version = 0x00000001
	VersionUnsupportedTest Version = 0x12345678
	VersionZero            Version = 0 // for test use
)

TODO: fill appropriate versions

func (Version) String

func (v Version) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL