Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseRouter ¶
type BaseRouter struct { }
func (*BaseRouter) BeforeHandle ¶
func (br *BaseRouter) BeforeHandle(request ziface.IRequest)
baserouter的方法都为空,router默认 为空。 处理前的方法
type Connection ¶
type Connection struct { //获取链接套接字 Conn *net.TCPConn //链接的ID ConnID uint32 //当前链接所绑定的处理方法API //handleAPI ziface.HandleFunc //告知当前链接已经退出的/停止 channel ExitChan chan bool // 该链接处理的方法Router Router ziface.IRouter // contains filtered or unexported fields }
链接模块
func NewConnection ¶
初始化链接模块的方法
func (*Connection) GetRemoteAddr ¶
func (c *Connection) GetRemoteAddr() net.Addr
获取远程客户端的TCP状态 IP port
func (*Connection) GetTCPConnection ¶
func (c *Connection) GetTCPConnection() *net.TCPConn
获取当前链接的绑定socket conn
Click to show internal directories.
Click to hide internal directories.