Documentation ¶
Index ¶
Constants ¶
View Source
const ( EventIn = 1 // 数据流入 EventClose = 2 // 断开连接 EventTimeout = 3 // 检测到超时 )
Variables ¶
View Source
var ErrNotEnough = errors.New("not enough")
Functions ¶
func TimeEncoder ¶
func TimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)
Types ¶
type Buffer ¶
type Buffer struct { Buf []byte // 应用内缓存区 // contains filtered or unexported fields }
buffer 读缓冲区,每个tcp长连接对应一个读缓冲区
func (*Buffer) ReadFromReader ¶
ReadFromReader 从reader里面读取数据,如果reader阻塞,会发生阻塞
Click to show internal directories.
Click to hide internal directories.