Versions in this module Expand all Collapse all v1 v1.0.2 Nov 1, 2023 Changes in this version + type HandleFunc func(*net.TCPConn, []byte, int) error + type IConnManager interface + AddConn func(connection IConnection) + GetConn func(connID uint32) (IConnection, error) + GetConnCnt func() int + RemoveAllConn func() + RemoveConn func(connection IConnection) + type IConnection interface + GetConnID func() int32 + GetTCPConnection func() *net.TCPConn + RemoteAddr func() net.Addr + SendMsg func(msgID uint32, data []byte) error + Start func() + Stop func() + type IDataPack interface + GetHeadLen func() uint32 + Pack func(msg IMessage) ([]byte, error) + UnPack func([]byte) (IMessage, error) + type IMessage interface + GetMsgData func() []byte + GetMsgID func() uint32 + GetMsgLen func() uint32 + SetMsgData func([]byte) + SetMsgID func(uint32) + SetMsgLen func(uint32) + type IMsgHandler interface + AddRouter func(msgID uint32, router Router) + Handle func(request IRequest) + SendMsgToTaskQueue func(req IRequest) + StartWorkPool func() + type IRequest interface + GetConn func() IConnection + GetData func() []byte + GetMsgID func() uint32 + GetMsgLen func() uint32 + type IServer interface + AddRouter func(msgID uint32, router Router) + CallOnConnClose func(conn IConnection) + CallOnConnStart func(conn IConnection) + GetConnManager func() IConnManager + Serve func() + SetOnConnClose func(f func(connection IConnection)) + SetOnConnStart func(f func(connection IConnection)) + Start func() + Stop func() + type Router interface + Handle func(req IRequest) + PostHandle func(req IRequest) + PreHandle func(req IRequest)