hpack

package
v0.0.0-...-dfd1b46 Latest Latest
Warning

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

Go to latest
Published: May 10, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrHeaderFieldsTooLarge = errors.New("header fields too large")
)

Functions

func HeaderFieldSize

func HeaderFieldSize(name, value string) uint32

func HuffmanDecode

func HuffmanDecode(dst, src []byte) []byte

func HuffmanEncode

func HuffmanEncode(dst []byte, s string) []byte

func HuffmanEncodedLen

func HuffmanEncodedLen(s string) uint64

func NeverSensitive

func NeverSensitive(string, string) bool

Types

type Decoder

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

func NewDecoder

func NewDecoder(maxHeaderTableSize uint32) *Decoder

func (*Decoder) Decode

func (dec *Decoder) Decode(headerBlock []byte, headerBlockSizeLimit uint32, handle HeaderFieldHandler) (uint32, error)

func (*Decoder) Len

func (dec *Decoder) Len() uint32

func (*Decoder) MaxHeaderTableSize

func (dec *Decoder) MaxHeaderTableSize() uint32

func (*Decoder) Reset

func (dec *Decoder) Reset() (err error)

func (*Decoder) SetMaxHeaderTableSize

func (dec *Decoder) SetMaxHeaderTableSize(max uint32)

type DecodingError

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

func (DecodingError) Error

func (e DecodingError) Error() string

type Encoder

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

func NewEncoder

func NewEncoder(maxHeaderTableSize uint32) *Encoder

func (*Encoder) EncodeHeaderField

func (enc *Encoder) EncodeHeaderField(dst []byte, name, value string, sensitive bool) (n uint32, _ []byte)

func (*Encoder) MaxHeaderTableSize

func (enc *Encoder) MaxHeaderTableSize() uint32

func (*Encoder) SetMaxHeaderTableSize

func (enc *Encoder) SetMaxHeaderTableSize(max uint32)

type HeaderFieldHandler

type HeaderFieldHandler func(name, value string, sensitive bool) error

Jump to

Keyboard shortcuts

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