Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentTyper ¶
type ContentTyper interface {
ContentType() string
}
type Packer ¶
type Packer interface { // Pack(rw io.Writer, payload Payloader) error // UnPack(r io.Reader) (Payloader, error) }
消息编解码器
type Payloader ¶
type Payloader interface { // 数据类型 Type() ContentTyper // 数据 head Head() []byte // 数据 Payload() []byte }
编解码包,根据 reader和writer来实现.,网络层面可以实现 使用超时机制控制的,和结束字符控制的,和长度控制的
Click to show internal directories.
Click to hide internal directories.