Documentation ¶
Index ¶
- Constants
- Variables
- type ControlFrame
- func (c *ControlFrame) Decode(r io.Reader) (err error)
- func (c *ControlFrame) DecodeEscape(r io.Reader) error
- func (c *ControlFrame) DecodeTypeEscape(r io.Reader, ctype uint32) error
- func (c *ControlFrame) Encode(w io.Writer) (err error)
- func (c *ControlFrame) EncodeFlush(w *bufio.Writer) error
- func (c *ControlFrame) MatchContentType(ctype []byte) bool
- func (c *ControlFrame) SetContentType(ctype []byte)
- type Decoder
- type DecoderOptions
- type Encoder
- type EncoderOptions
Constants ¶
View Source
const CONTROL_ACCEPT = 0x01
View Source
const CONTROL_FIELD_CONTENT_TYPE = 0x01
View Source
const CONTROL_FINISH = 0x05
View Source
const CONTROL_READY = 0x04
View Source
const CONTROL_START = 0x02
View Source
const CONTROL_STOP = 0x03
View Source
const DEFAULT_MAX_PAYLOAD_SIZE = 1048576
View Source
const MAX_CONTROL_FRAME_SIZE = 512
Variables ¶
View Source
var ControlAccept = ControlFrame{ControlType: CONTROL_ACCEPT}
View Source
var ControlFinish = ControlFrame{ControlType: CONTROL_FINISH}
View Source
var ControlReady = ControlFrame{ControlType: CONTROL_READY}
View Source
var ControlStart = ControlFrame{ControlType: CONTROL_START}
View Source
var ControlStop = ControlFrame{ControlType: CONTROL_STOP}
View Source
var EOF = io.EOF
View Source
var ErrContentTypeMismatch = errors.New("content type mismatch")
View Source
var ErrDataFrameTooLarge = errors.New("data frame too large")
View Source
var ErrDecode = errors.New("decoding error")
View Source
var ErrShortRead = errors.New("short read")
View Source
var ErrType = errors.New("invalid type")
Functions ¶
This section is empty.
Types ¶
type ControlFrame ¶
func (*ControlFrame) DecodeEscape ¶
func (c *ControlFrame) DecodeEscape(r io.Reader) error
func (*ControlFrame) DecodeTypeEscape ¶
func (c *ControlFrame) DecodeTypeEscape(r io.Reader, ctype uint32) error
func (*ControlFrame) EncodeFlush ¶
func (c *ControlFrame) EncodeFlush(w *bufio.Writer) error
func (*ControlFrame) MatchContentType ¶
func (c *ControlFrame) MatchContentType(ctype []byte) bool
func (*ControlFrame) SetContentType ¶
func (c *ControlFrame) SetContentType(ctype []byte)
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func NewDecoder ¶
func NewDecoder(r io.Reader, opt *DecoderOptions) (dec *Decoder, err error)
type DecoderOptions ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func NewEncoder ¶
func NewEncoder(w io.Writer, opt *EncoderOptions) (enc *Encoder, err error)
Click to show internal directories.
Click to hide internal directories.