http3

package
v0.0.0-...-434cb5b Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StreamTypeControl = 0x00
	StreamTypePush    = 0x01
)
View Source
const (
	FrameTypeDATA         = 0x0
	FrameTypeHEADERS      = 0x1
	FrameTypePRIORITY     = 0x2
	FrameTypeCANCEL_PUSH  = 0x3
	FrameTypeSETTINGS     = 0x4
	FrameTypePUSH_PROMISE = 0x5
	FrameTypeGOAWAY       = 0x7
	FrameTypeMAX_PUSH_ID  = 0xd
)
View Source
const (
	ElementTypeRequestStream = 0x00
	ElementTypePushStream    = 0x01
	ElementTypePlaceholder   = 0x10
	ElementTypeRootOfTheTree = 0x11
)
View Source
const (
	SETTINGS_HEADER_TABLE_SIZE     = 0x01
	SETTINGS_MAX_HEADER_LIST_SIZE  = 0x06
	SETTINGS_QPACK_BLOCKED_STREAMS = 0x07
	SETTINGS_NUM_PLACEHOLDERS      = 0x09
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CANCEL_PUSH

type CANCEL_PUSH struct {
	HTTPFrameHeader
	PushID VarInt
}

func NewCANCEL_PUSH

func NewCANCEL_PUSH(pushID uint64) *CANCEL_PUSH

func ReadCANCEL_PUSH

func ReadCANCEL_PUSH(buffer *bytes.Reader) *CANCEL_PUSH

func (*CANCEL_PUSH) Name

func (f *CANCEL_PUSH) Name() string

func (*CANCEL_PUSH) WriteTo

func (f *CANCEL_PUSH) WriteTo(buffer *bytes.Buffer)

type DATA

type DATA struct {
	HTTPFrameHeader
	Payload []byte
}

func NewDATA

func NewDATA(payload []byte) *DATA

func ReadDATA

func ReadDATA(buffer *bytes.Reader) *DATA

func (*DATA) Name

func (f *DATA) Name() string

func (*DATA) WriteTo

func (f *DATA) WriteTo(buffer *bytes.Buffer)

type GOAWAY

type GOAWAY struct {
	HTTPFrameHeader
	StreamID VarInt
}

func NewGOAWAY

func NewGOAWAY(streamID uint64) *GOAWAY

func ReadGOAWAY

func ReadGOAWAY(buffer *bytes.Reader) *GOAWAY

func (*GOAWAY) Name

func (f *GOAWAY) Name() string

func (*GOAWAY) WriteTo

func (f *GOAWAY) WriteTo(buffer *bytes.Buffer)

type HEADERS

type HEADERS struct {
	HTTPFrameHeader
	HeaderBlock []byte
}

func NewHEADERS

func NewHEADERS(headerBlock []byte) *HEADERS

func ReadHEADERS

func ReadHEADERS(buffer *bytes.Reader) *HEADERS

func (*HEADERS) Name

func (f *HEADERS) Name() string

func (*HEADERS) WriteTo

func (f *HEADERS) WriteTo(buffer *bytes.Buffer)

type HTTPFrame

type HTTPFrame interface {
	FrameType() uint64
	Name() string
	WriteTo(buffer *bytes.Buffer)
	WireLength() uint64
}

func ReadHTTPFrame

func ReadHTTPFrame(buffer *bytes.Reader) HTTPFrame

type HTTPFrameHeader

type HTTPFrameHeader struct {
	Type   VarInt
	Length VarInt
}

func ReadHTTPFrameHeader

func ReadHTTPFrameHeader(buffer *bytes.Reader) HTTPFrameHeader

func (*HTTPFrameHeader) FrameType

func (h *HTTPFrameHeader) FrameType() uint64

func (*HTTPFrameHeader) WireLength

func (h *HTTPFrameHeader) WireLength() uint64

func (*HTTPFrameHeader) WriteTo

func (h *HTTPFrameHeader) WriteTo(buffer *bytes.Buffer)

type MAX_PUSH_ID

type MAX_PUSH_ID struct {
	HTTPFrameHeader
	PushID VarInt
}

func NewMAX_PUSH_ID

func NewMAX_PUSH_ID(pushID uint64) *MAX_PUSH_ID

func ReadMAX_PUSH_ID

func ReadMAX_PUSH_ID(buffer *bytes.Reader) *MAX_PUSH_ID

func (*MAX_PUSH_ID) Name

func (f *MAX_PUSH_ID) Name() string

func (*MAX_PUSH_ID) WriteTo

func (f *MAX_PUSH_ID) WriteTo(buffer *bytes.Buffer)

type PRIORITY

type PRIORITY struct {
	HTTPFrameHeader
	PrioritizedType      uint8
	DependencyType       uint8
	Empty                uint8
	Exclusive            bool
	PrioritizedElementID VarInt
	ElementDependencyID  VarInt
	Weight               uint8
}

func NewPRIORITY

func NewPRIORITY(prioritizedType uint8,
	dependencyType uint8,
	exclusive bool,
	prioritizedElementID uint64,
	elementDependencyID uint64,
	weight uint8,
) *PRIORITY

func ReadPRIORITY

func ReadPRIORITY(buffer *bytes.Reader) *PRIORITY

func (*PRIORITY) Name

func (f *PRIORITY) Name() string

func (*PRIORITY) WriteTo

func (f *PRIORITY) WriteTo(buffer *bytes.Buffer)

type PUSH_PROMISE

type PUSH_PROMISE struct {
	HTTPFrameHeader
	PushID      VarInt
	HeaderBlock []byte
}

func NewPUSH_PROMISE

func NewPUSH_PROMISE(pushID uint64, headerBlock []byte) *PUSH_PROMISE

func ReadPUSH_PROMISE

func ReadPUSH_PROMISE(buffer *bytes.Reader) *PUSH_PROMISE

func (*PUSH_PROMISE) Name

func (f *PUSH_PROMISE) Name() string

func (*PUSH_PROMISE) WriteTo

func (f *PUSH_PROMISE) WriteTo(buffer *bytes.Buffer)

type SETTINGS

type SETTINGS struct {
	HTTPFrameHeader
	Settings []Setting
}

func NewSETTINGS

func NewSETTINGS(settings []Setting) *SETTINGS

func ReadSETTINGS

func ReadSETTINGS(buffer *bytes.Reader) *SETTINGS

func (*SETTINGS) Name

func (f *SETTINGS) Name() string

func (*SETTINGS) WriteTo

func (f *SETTINGS) WriteTo(buffer *bytes.Buffer)

type Setting

type Setting struct {
	Identifier VarInt
	Value      VarInt
}

func ReadSetting

func ReadSetting(buffer *bytes.Reader) Setting

func (Setting) WriteTo

func (s Setting) WriteTo(buffer *bytes.Buffer)

type UnknownFrame

type UnknownFrame struct {
	HTTPFrameHeader
	OpaquePayload []byte
}

func ReadUnknownFrame

func ReadUnknownFrame(buffer *bytes.Reader) *UnknownFrame

func (*UnknownFrame) Name

func (f *UnknownFrame) Name() string

func (*UnknownFrame) WriteTo

func (f *UnknownFrame) WriteTo(buffer *bytes.Buffer)

Jump to

Keyboard shortcuts

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