Documentation
¶
Overview ¶
network.go
tcpclient.go
Index ¶
- Constants
- Variables
- 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
- type ActionHandler
- type HandleDecodeFunc
- type HandleEncodeFunc
- type Service
- type TcpClient
Constants ¶
View Source
const ( // for server mode ActionTypeForServer = uint8(1) // for client mode ActionTypeForClient = uint8(2) )
View Source
const (
KeepAlive = int64(30 * time.Second)
)
Variables ¶
View Source
var ActionType uint8 = ActionTypeForServer
action work type default server
Functions ¶
func BootServer ¶
func BootServer() error
func GetActionManagerIns ¶
func GetActionManagerIns() *actionManager
func QueueServiceIns ¶
func QueueServiceIns() *queueService
func ServerLoginBack ¶
func ServerLoginBack(cglm *proto.CG_LonginMessage, session *common.Session, roleId int64, retCode int8, errMsg string, queueIndex int32)
common login back if login not ok
func ServerLoginBackFail ¶
func TcpServerIns ¶
func TcpServerIns() *tcpServer
Types ¶
type ActionHandler ¶
type ActionHandler func(proto.ProtoMessage, interface{}) error
type HandleEncodeFunc ¶
type HandleEncodeFunc func(*bufio.Writer, proto.ProtoMessage) error
type TcpClient ¶
type TcpClient struct {
// contains filtered or unexported fields
}
func NewTcpClient ¶
create a TcpCient call InitAccount call Start
func (*TcpClient) FillAccount ¶
func (*TcpClient) InitAccount ¶
Click to show internal directories.
Click to hide internal directories.