Versions in this module Expand all Collapse all v1 v1.0.1 Oct 22, 2019 Changes in this version + const ActionTypeForClient + const ActionTypeForServer + const KeepAlive + var ActionType uint8 = ActionTypeForServer + func BootServer() error + func GetActionManagerIns() *actionManager + func QueueServiceIns() *queueService + func ServerLoginBack(cglm *proto.CG_LonginMessage, session *common.Session, roleId int64, ...) + func ServerLoginBackFail(cglm *proto.CG_LonginMessage, session *common.Session, retCode int8, ...) + func TcpServerIns() *tcpServer + type Account struct + AccId string + AccName string + AuthToken string + RoleId int64 + type ActionHandler func(proto.ProtoMessage, interface{}) error + type HandleDecodeFunc func(*common.Session, *bufio.Reader) error + type HandleEncodeFunc func(*bufio.Writer, proto.ProtoMessage) error + type Service interface + Start func() error + Stop func() error + Tick func(delta int64) error + type TcpClient struct + func NewTcpClient(addr string, id uint64) (*TcpClient, error) + func (client *TcpClient) Close() error + func (client *TcpClient) FillAccount(roleId int64) + func (client *TcpClient) Id() uint64 + func (client *TcpClient) InitAccount(accId string, accName string) + func (client *TcpClient) Start() error