Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
Context manages both HPACK encoding and decoding. Is basically a wrapper.
func NewContext ¶
NewContext creates a new hpack-context. It initializes a new dynamic table with a given max-size.
func (*Context) Decode ¶
func (c *Context) Decode(bytes []byte) ([]*HeaderField, error)
Decode decodes a sequence of bytes from a header frame. Returns an array of HeaderFields
func (*Context) DecoderDynamicTable ¶
func (c *Context) DecoderDynamicTable() []*HeaderField
DecoderDynamicTable returns a deep copy of the HeaderFields in the decoder's dynamic table
func (*Context) Encode ¶
func (c *Context) Encode(hfs []*HeaderField) []byte
Encode encodes a set of headers
func (*Context) EncoderDynamicTable ¶
func (c *Context) EncoderDynamicTable() []*HeaderField
EncoderDynamicTable returns a deep copy of the HeaderFields in the encoder's dynamic table
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder manages the decoding of headerfields
func NewDecoder ¶
NewDecoder creates a new decoder with given table size
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder manages the encoding of headerfields
func NewEncoder ¶
NewEncoder creates a new encoder with given table size
func (*Encoder) EncodeField ¶
func (e *Encoder) EncodeField(hf *HeaderField) []byte
EncodeField encodes a given headerfield and returns the sequence of encoded bytes
type HeaderField ¶
HeaderField contains the name and the value of a header
func (*HeaderField) String ¶
func (hf *HeaderField) String() string