Documentation
¶
Index ¶
Constants ¶
View Source
const ( Request kind = iota Response )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Decoder ¶
type Decoder struct {
LengthBased *codec.LengthBased
}
Decoder 解码器
func NewDecoder ¶
func NewDecoder() *Decoder
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
type Message ¶
type Message struct { Version int // 协议版本号 Length int // 消息正文长度 Serializer SerializerType // 序列化算法 Kind kind // 消息类型, 请求 or 响应 Sequence int // 消息序号, 四个字节,请求和应答序号一致, 用于支持全双工通讯 // contains filtered or unexported fields }
func NewMessage ¶
Click to show internal directories.
Click to hide internal directories.