Documentation ¶
Overview ¶
Package tcp implements the framework of TCP connection.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder interface { // ReadFrom 从TCPConn中读取数据,返回数据处理Handler,如果连接接收缓冲没有数据,方法将会阻塞 // 返回error保持与TCPConn.Read保持一致,io.EOF为对方关闭,net.ErrClosed为己方关闭 ReadFrom(c net.Conn) (Handler, error) }
Decoder 从TCP连接中读取数据的解析器,并返回Handler,在单独goroutine中执行
Click to show internal directories.
Click to hide internal directories.