Documentation
¶
Index ¶
Constants ¶
View Source
const ( // NilCodecID 空的编解码器id. NilCodecID byte = 0 // NilCodecName 空的编解码器名称. NilCodecName string = "" )
View Source
const ( NameJson = "json" IdJson = 'j' )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Codec ¶
type Codec interface {
ID() byte
Name() string
Marshal(interface{}) ([]byte, error)
Unmarshal([]byte, interface{}) error
}
Codec 消息内容的编解码器
Click to show internal directories.
Click to hide internal directories.