Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func EncodeToBytes ¶
Types ¶
type Conn ¶
type Conn struct {
Sock net.Conn
// 这两个超时时间的设置见 router/session.go, NewSessionSize()
ReaderTimeout time.Duration
WriterTimeout time.Duration
// 这两个是指针, 何时赋值初始化, 对Sock的包装,
// 默认 bufsize 为64k.
Reader *Decoder
Writer *Encoder
}
封装关系 循环引用了 Conn <- Decoder <- connReader <- Conn
type Decoder ¶
func NewDecoder ¶
type Encoder ¶
func NewEncoder ¶
Click to show internal directories.
Click to hide internal directories.