Documentation ¶
Index ¶
Constants ¶
View Source
const ( HeadLength = 32 MaxPacketSize = 64 * 1024 )
Codec constants.
Variables ¶
View Source
var ErrPacketSizeExcced = errors.New("codec: packet size exceed")
ErrPacketSizeExcced is the error used for encode/decode.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
A Decoder reads and decodes network data slice
func NewDecoder ¶
func NewDecoder() *Decoder
NewDecoder returns a new decoder that used for decode network bytes slice.
Click to show internal directories.
Click to hide internal directories.