Documentation ¶
Overview ¶
Package packet is codec of packet for connection which supports framing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDecoder ¶
func NewDecoder(r FrameReader) base.FrameReader
NewDecoder creates a packet decoder which reads from r.
func NewEncoder ¶
func NewEncoder(w FrameWriter) base.FrameWriter
NewEncoder creates a packet encoder which writes to w.
Types ¶
type FrameReader ¶
type FrameReader interface {
NextReader() (base.FrameType, io.ReadCloser, error)
}
FrameReader is the reader which supports framing.
type FrameWriter ¶
type FrameWriter interface {
NextWriter(typ base.FrameType) (io.WriteCloser, error)
}
FrameWriter is the writer which supports framing.
Click to show internal directories.
Click to hide internal directories.