frame

package
v0.0.0-...-fe14df0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DataType byte = iota
	HeadersType
	PriorityType
	RstStreamType
	SettingsType
	PushPromiseType
	PingType
	GoAwayType
	WindowUpdateType
	ContinuationType
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Frame

type Frame struct {
	// Remember to ignore the first bit of this field when reading
	ID      uint32
	Type    byte
	Flags   types.IFlags
	Length  uint32
	Payload types.IPayload
}

Frame describes the data that is needed to receive and send a frame

func NewErrorFrame

func NewErrorFrame(streamID, errorCode uint32) *Frame

NewErrorFrame is a helper function for easily creating RstStream frames that occur on various errors

func ReadFrame

func ReadFrame(r io.Reader) (Frame, error)

ReadFrame takes a reader and returns a frame with type

func (*Frame) ToBytes

func (f *Frame) ToBytes() []byte

ToBytes turnes a frame into sendable bytes

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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