reciever

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFrameTypeNotSupported = errors.New("frame type not supported")

Functions

This section is empty.

Types

type FrameTypeProcessor

type FrameTypeProcessor interface {
	Process(header frameheader.FrameHeader, payload []byte, incomplete bool) error
}

type Framer

type Framer struct {
	// contains filtered or unexported fields
}

func (*Framer) Fill

func (p *Framer) Fill(b []byte)

func (*Framer) Header

func (p *Framer) Header() frameheader.FrameHeader

func (*Framer) Next

func (p *Framer) Next() ([]byte, Status)

type GoAwayError

type GoAwayError struct {
	Code         http2.ErrCode
	LastStreamID uint32
	DebugData    []byte
}

func (GoAwayError) Error

func (e GoAwayError) Error() string

type Processor

type Processor struct {
	// contains filtered or unexported fields
}

func NewDefaultProcessor

func NewDefaultProcessor(
	streamsStore types.StreamStore,
	streamsLimiter types.StreamsLimiter,
	fcConn types.FlowControl,
	priorityFramesChan chan<- []byte,
) *Processor

func NewProcessor

func NewProcessor(subprocessors []FrameTypeProcessor) *Processor

func (*Processor) Run

func (p *Processor) Run(ch <-chan []byte) error

type RSTStreamError

type RSTStreamError struct {
	Code http2.ErrCode
}

func (RSTStreamError) Error

func (e RSTStreamError) Error() string

type Reciever

type Reciever struct {
	// contains filtered or unexported fields
}

func NewReciever

func NewReciever(
	conn net.Conn,
	fcConn types.FlowControl,
	priorityFramesChan chan<- []byte,
	streams types.Streams,
) *Reciever

func (*Reciever) Run

func (r *Reciever) Run(ctx context.Context) error

type Status

type Status int
const (
	StatusFrameDone Status = iota
	StatusFrameDoneBufEmpty
	StatusHeaderIncomplete
	StatusPayloadIncomplete
)

Jump to

Keyboard shortcuts

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