h3

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FRAME_DATA                = 0x00
	FRAME_HEADERS             = 0x01
	FRAME_CANCEL_PUSH         = 0x03
	FRAME_SETTINGS            = 0x04
	FRAME_PUSH_PROMISE        = 0x05
	FRAME_GOAWAY              = 0x07
	FRAME_MAX_PUSH_ID         = 0x0D
	FRAME_WEBTRANSPORT_STREAM = 0x41
)

Frame types

Settings

View Source
const (
	STREAM_CONTROL                 = 0x00
	STREAM_PUSH                    = 0x01
	STREAM_QPACK_ENCODER           = 0x02
	STREAM_QPACK_DECODER           = 0x03
	STREAM_WEBTRANSPORT_UNI_STREAM = 0x54
)

Stream types

Variables

This section is empty.

Functions

func RequestFromHeaders

func RequestFromHeaders(headers []qpack.HeaderField) (*http.Request, string, error)

Types

type DataStreamer

type DataStreamer interface {
	DataStream() quic.Stream
}

DataStreamer lets the caller take over the stream. After a call to DataStream the HTTP server library will not do anything else with the connection.

It becomes the caller's responsibility to manage and close the stream.

After a call to DataStream, the original Request.Body must not be used.

type Frame

type Frame struct {
	Type      uint64
	SessionID uint64
	Length    uint64
	Data      []byte
}

HTTP/3 frame

func (*Frame) Read

func (f *Frame) Read(r io.Reader) error

func (*Frame) Write

func (f *Frame) Write(w io.Writer) (int, error)

type ResponseWriter

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

func NewResponseWriter

func NewResponseWriter(stream quic.Stream) *ResponseWriter

func (*ResponseWriter) DataStream

func (w *ResponseWriter) DataStream() quic.Stream

func (*ResponseWriter) Flush

func (w *ResponseWriter) Flush()

func (*ResponseWriter) Header

func (w *ResponseWriter) Header() http.Header

func (*ResponseWriter) Write

func (w *ResponseWriter) Write(p []byte) (int, error)

func (*ResponseWriter) WriteHeader

func (w *ResponseWriter) WriteHeader(status int)

type SettingID

type SettingID uint64

func (SettingID) String

func (id SettingID) String() string

type SettingsMap

type SettingsMap map[SettingID]uint64

func (*SettingsMap) FromFrame

func (s *SettingsMap) FromFrame(f Frame) error

func (SettingsMap) ToFrame

func (s SettingsMap) ToFrame() Frame

type StreamHeader

type StreamHeader struct {
	Type uint64
	ID   uint64
}

HTTP/3 stream header

func (*StreamHeader) Read

func (s *StreamHeader) Read(r io.Reader) error

func (*StreamHeader) Write

func (s *StreamHeader) Write(w io.Writer) (int, error)

Jump to

Keyboard shortcuts

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