Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IConnManger ¶
type IConnManger interface { Add(conn IConnection) Remove(conn IConnection) Get(connID uint32) (IConnection, error) Len() int ClearConn() }
连接管理模块
type IConnection ¶
type IMsgHandle ¶
type IRequest ¶
type IRequest interface { GetConnection() IConnection GetData() []byte GetMsgID() uint32 }
type IServer ¶
type IServer interface { Start() Stop() Server() AddRoute(msgId uint32, route IRoute) GetConnMgr() IConnManger // 设置该Server的连接创建时Hook函数 SetOnConnStart(func(IConnection)) // 设置该Server的连接断开时Hook函数 SetOnConnStop(func(IConnection)) // 调用连接OnConnStart Hook函数 CallOnConnStart(IConnection) // 调用连接OnConnStop Hook函数 CallOnConnStop(IConnection) }
Click to show internal directories.
Click to hide internal directories.