servercomm

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package servercomm micserver中模块间发送的消息的定义,由 *_binary.go 实现二进制协议。

Index

Constants

View Source
const (
	// 登录成功
	LoginRetCodeSecess = 0
	// 身份验证错误
	LoginRetCodeIdentity = 1
	// 重复连接
	LoginRetCodeIdentical = 2
)

login result

View Source
const (
	ModuleInfoID              = 36
	STimeTickCommandID        = 37
	STestCommandID            = 38
	SLoginCommandID           = 39
	SLogoutCommandID          = 40
	SSeverStartOKCommandID    = 41
	SLoginRetCommandID        = 42
	SStartRelyNotifyCommandID = 43
	SStartMyNotifyCommandID   = 44
	SNotifyAllInfoID          = 45
	SNotifySafelyQuitID       = 46
	SUpdateSessionID          = 47
	SReqCloseConnectID        = 48
	SForwardToModuleID        = 49
	ModuleMessageID           = 50
	SForwardToClientID        = 51
	SForwardFromGateID        = 52
	ClientMessageID           = 53
	SROCRequestID             = 54
	SROCResponseID            = 55
	SROCBindID                = 56
)
View Source
const (
	ModuleInfoName              = "servercomm.ModuleInfo"
	STimeTickCommandName        = "servercomm.STimeTickCommand"
	STestCommandName            = "servercomm.STestCommand"
	SLoginCommandName           = "servercomm.SLoginCommand"
	SLogoutCommandName          = "servercomm.SLogoutCommand"
	SSeverStartOKCommandName    = "servercomm.SSeverStartOKCommand"
	SLoginRetCommandName        = "servercomm.SLoginRetCommand"
	SStartRelyNotifyCommandName = "servercomm.SStartRelyNotifyCommand"
	SStartMyNotifyCommandName   = "servercomm.SStartMyNotifyCommand"
	SNotifyAllInfoName          = "servercomm.SNotifyAllInfo"
	SNotifySafelyQuitName       = "servercomm.SNotifySafelyQuit"
	SUpdateSessionName          = "servercomm.SUpdateSession"
	SReqCloseConnectName        = "servercomm.SReqCloseConnect"
	SForwardToModuleName        = "servercomm.SForwardToModule"
	ModuleMessageName           = "servercomm.ModuleMessage"
	SForwardToClientName        = "servercomm.SForwardToClient"
	SForwardFromGateName        = "servercomm.SForwardFromGate"
	ClientMessageName           = "servercomm.ClientMessage"
	SROCRequestName             = "servercomm.SROCRequest"
	SROCResponseName            = "servercomm.SROCResponse"
	SROCBindName                = "servercomm.SROCBind"
)

Variables

This section is empty.

Functions

func GetSizeClientMessage

func GetSizeClientMessage(obj *ClientMessage) int

func GetSizeModuleInfo

func GetSizeModuleInfo(obj *ModuleInfo) int

func GetSizeModuleMessage

func GetSizeModuleMessage(obj *ModuleMessage) int

func GetSizeSForwardFromGate

func GetSizeSForwardFromGate(obj *SForwardFromGate) int

func GetSizeSForwardToClient

func GetSizeSForwardToClient(obj *SForwardToClient) int

func GetSizeSForwardToModule

func GetSizeSForwardToModule(obj *SForwardToModule) int

func GetSizeSLoginCommand

func GetSizeSLoginCommand(obj *SLoginCommand) int

func GetSizeSLoginRetCommand

func GetSizeSLoginRetCommand(obj *SLoginRetCommand) int

func GetSizeSLogoutCommand

func GetSizeSLogoutCommand(obj *SLogoutCommand) int

func GetSizeSNotifyAllInfo

func GetSizeSNotifyAllInfo(obj *SNotifyAllInfo) int

func GetSizeSNotifySafelyQuit

func GetSizeSNotifySafelyQuit(obj *SNotifySafelyQuit) int

func GetSizeSROCBind

func GetSizeSROCBind(obj *SROCBind) int

func GetSizeSROCRequest

func GetSizeSROCRequest(obj *SROCRequest) int

func GetSizeSROCResponse

func GetSizeSROCResponse(obj *SROCResponse) int

func GetSizeSReqCloseConnect

func GetSizeSReqCloseConnect(obj *SReqCloseConnect) int

func GetSizeSSeverStartOKCommand

func GetSizeSSeverStartOKCommand(obj *SSeverStartOKCommand) int

func GetSizeSStartMyNotifyCommand

func GetSizeSStartMyNotifyCommand(obj *SStartMyNotifyCommand) int

func GetSizeSStartRelyNotifyCommand

func GetSizeSStartRelyNotifyCommand(obj *SStartRelyNotifyCommand) int

func GetSizeSTestCommand

func GetSizeSTestCommand(obj *STestCommand) int

func GetSizeSTimeTickCommand

func GetSizeSTimeTickCommand(obj *STimeTickCommand) int

func GetSizeSUpdateSession

func GetSizeSUpdateSession(obj *SUpdateSession) int

func MsgIdToString

func MsgIdToString(id uint16) string

func StringToMsgId

func StringToMsgId(msgname string) uint16

func WriteMsgClientMessageByObj

func WriteMsgClientMessageByObj(data []byte, obj *ClientMessage) int

func WriteMsgModuleInfoByObj

func WriteMsgModuleInfoByObj(data []byte, obj *ModuleInfo) int

func WriteMsgModuleMessageByObj

func WriteMsgModuleMessageByObj(data []byte, obj *ModuleMessage) int

func WriteMsgSForwardFromGateByObj

func WriteMsgSForwardFromGateByObj(data []byte, obj *SForwardFromGate) int

func WriteMsgSForwardToClientByObj

func WriteMsgSForwardToClientByObj(data []byte, obj *SForwardToClient) int

func WriteMsgSForwardToModuleByObj

func WriteMsgSForwardToModuleByObj(data []byte, obj *SForwardToModule) int

func WriteMsgSLoginCommandByObj

func WriteMsgSLoginCommandByObj(data []byte, obj *SLoginCommand) int

func WriteMsgSLoginRetCommandByObj

func WriteMsgSLoginRetCommandByObj(data []byte, obj *SLoginRetCommand) int

func WriteMsgSLogoutCommandByObj

func WriteMsgSLogoutCommandByObj(data []byte, obj *SLogoutCommand) int

func WriteMsgSNotifyAllInfoByObj

func WriteMsgSNotifyAllInfoByObj(data []byte, obj *SNotifyAllInfo) int

func WriteMsgSNotifySafelyQuitByObj

func WriteMsgSNotifySafelyQuitByObj(data []byte, obj *SNotifySafelyQuit) int

func WriteMsgSROCBindByObj

func WriteMsgSROCBindByObj(data []byte, obj *SROCBind) int

func WriteMsgSROCRequestByObj

func WriteMsgSROCRequestByObj(data []byte, obj *SROCRequest) int

func WriteMsgSROCResponseByObj

func WriteMsgSROCResponseByObj(data []byte, obj *SROCResponse) int

func WriteMsgSReqCloseConnectByObj

func WriteMsgSReqCloseConnectByObj(data []byte, obj *SReqCloseConnect) int

func WriteMsgSSeverStartOKCommandByObj

func WriteMsgSSeverStartOKCommandByObj(data []byte, obj *SSeverStartOKCommand) int

func WriteMsgSStartMyNotifyCommandByObj

func WriteMsgSStartMyNotifyCommandByObj(data []byte, obj *SStartMyNotifyCommand) int

func WriteMsgSStartRelyNotifyCommandByObj

func WriteMsgSStartRelyNotifyCommandByObj(data []byte, obj *SStartRelyNotifyCommand) int

func WriteMsgSTestCommandByObj

func WriteMsgSTestCommandByObj(data []byte, obj *STestCommand) int

func WriteMsgSTimeTickCommandByObj

func WriteMsgSTimeTickCommandByObj(data []byte, obj *STimeTickCommand) int

func WriteMsgSUpdateSessionByObj

func WriteMsgSUpdateSessionByObj(data []byte, obj *SUpdateSession) int

Types

type ClientMessage

type ClientMessage struct {
	FromModule   *ModuleInfo
	ClientConnID string
	MsgID        uint16
	Data         []byte
}

ClientMessage 客户端消息

func ReadMsgClientMessageByBytes

func ReadMsgClientMessageByBytes(indata []byte, obj *ClientMessage) (int, *ClientMessage)

func (*ClientMessage) GetJSON

func (this *ClientMessage) GetJSON() string

func (*ClientMessage) GetMsgId

func (this *ClientMessage) GetMsgId() uint16

func (*ClientMessage) GetMsgName

func (this *ClientMessage) GetMsgName() string

func (*ClientMessage) GetSize

func (this *ClientMessage) GetSize() int

func (*ClientMessage) ReadBinary

func (this *ClientMessage) ReadBinary(data []byte) int

func (*ClientMessage) WriteBinary

func (this *ClientMessage) WriteBinary(data []byte) int

type ModuleInfo

type ModuleInfo struct {
	ModuleID   string
	ModuleAddr string
	// 服务器序号 重复不影响正常运行
	// 但是其改动会影响 配置读取/ServerName/Log文件名
	ModuleNumber uint32
	// 服务器数字版本
	// 命名规则为: YYYYMMDDhhmm (年月日时分)
	Version uint64
}

ModuleInfo 一个模块的信息

func ReadMsgModuleInfoByBytes

func ReadMsgModuleInfoByBytes(indata []byte, obj *ModuleInfo) (int, *ModuleInfo)

func (*ModuleInfo) GetJSON

func (this *ModuleInfo) GetJSON() string

func (*ModuleInfo) GetMsgId

func (this *ModuleInfo) GetMsgId() uint16

func (*ModuleInfo) GetMsgName

func (this *ModuleInfo) GetMsgName() string

func (*ModuleInfo) GetSize

func (this *ModuleInfo) GetSize() int

func (*ModuleInfo) ReadBinary

func (this *ModuleInfo) ReadBinary(data []byte) int

func (*ModuleInfo) WriteBinary

func (this *ModuleInfo) WriteBinary(data []byte) int

type ModuleMessage

type ModuleMessage struct {
	FromModule *ModuleInfo
	MsgID      uint16
	Data       []byte
}

ModuleMessage 模块间传递的消息

func ReadMsgModuleMessageByBytes

func ReadMsgModuleMessageByBytes(indata []byte, obj *ModuleMessage) (int, *ModuleMessage)

func (*ModuleMessage) GetJSON

func (this *ModuleMessage) GetJSON() string

func (*ModuleMessage) GetMsgId

func (this *ModuleMessage) GetMsgId() uint16

func (*ModuleMessage) GetMsgName

func (this *ModuleMessage) GetMsgName() string

func (*ModuleMessage) GetSize

func (this *ModuleMessage) GetSize() int

func (*ModuleMessage) ReadBinary

func (this *ModuleMessage) ReadBinary(data []byte) int

func (*ModuleMessage) WriteBinary

func (this *ModuleMessage) WriteBinary(data []byte) int

type SForwardFromGate

type SForwardFromGate struct {
	FromModuleID string
	ToModuleID   string
	ClientConnID string
	Session      map[string]string
	MsgID        uint16
	Data         []byte
}

SForwardFromGate 网关分发的客户端消息

func ReadMsgSForwardFromGateByBytes

func ReadMsgSForwardFromGateByBytes(indata []byte, obj *SForwardFromGate) (int, *SForwardFromGate)

func (*SForwardFromGate) GetJSON

func (this *SForwardFromGate) GetJSON() string

func (*SForwardFromGate) GetMsgId

func (this *SForwardFromGate) GetMsgId() uint16

func (*SForwardFromGate) GetMsgName

func (this *SForwardFromGate) GetMsgName() string

func (*SForwardFromGate) GetSize

func (this *SForwardFromGate) GetSize() int

func (*SForwardFromGate) ReadBinary

func (this *SForwardFromGate) ReadBinary(data []byte) int

func (*SForwardFromGate) WriteBinary

func (this *SForwardFromGate) WriteBinary(data []byte) int

type SForwardToClient

type SForwardToClient struct {
	FromModuleID string
	ToGateID     string
	ToClientID   string
	MsgID        uint16
	Data         []byte
}

SForwardToClient 请求转发一个客户端消息

func ReadMsgSForwardToClientByBytes

func ReadMsgSForwardToClientByBytes(indata []byte, obj *SForwardToClient) (int, *SForwardToClient)

func (*SForwardToClient) GetJSON

func (this *SForwardToClient) GetJSON() string

func (*SForwardToClient) GetMsgId

func (this *SForwardToClient) GetMsgId() uint16

func (*SForwardToClient) GetMsgName

func (this *SForwardToClient) GetMsgName() string

func (*SForwardToClient) GetSize

func (this *SForwardToClient) GetSize() int

func (*SForwardToClient) ReadBinary

func (this *SForwardToClient) ReadBinary(data []byte) int

func (*SForwardToClient) WriteBinary

func (this *SForwardToClient) WriteBinary(data []byte) int

type SForwardToModule

type SForwardToModule struct {
	FromModuleID string
	ToModuleID   string
	MsgID        uint16
	Data         []byte
}

SForwardToModule 模块间消息转发请求

func ReadMsgSForwardToModuleByBytes

func ReadMsgSForwardToModuleByBytes(indata []byte, obj *SForwardToModule) (int, *SForwardToModule)

func (*SForwardToModule) GetJSON

func (this *SForwardToModule) GetJSON() string

func (*SForwardToModule) GetMsgId

func (this *SForwardToModule) GetMsgId() uint16

func (*SForwardToModule) GetMsgName

func (this *SForwardToModule) GetMsgName() string

func (*SForwardToModule) GetSize

func (this *SForwardToModule) GetSize() int

func (*SForwardToModule) ReadBinary

func (this *SForwardToModule) ReadBinary(data []byte) int

func (*SForwardToModule) WriteBinary

func (this *SForwardToModule) WriteBinary(data []byte) int

type SLoginCommand

type SLoginCommand struct {
	ModuleID   string
	ModuleAddr string // IP
	// 登录优先级
	ConnectPriority int64
	// 服务器序号 重复不影响正常运行
	// 但是其改动会影响 配置读取/ServerName/Log文件名
	ModuleNumber uint32
	// 服务器数字版本
	// 命名规则为: YYYYMMDDhhmm (年月日时分)
	Version uint64
}

SLoginCommand 模块登陆请求

func ReadMsgSLoginCommandByBytes

func ReadMsgSLoginCommandByBytes(indata []byte, obj *SLoginCommand) (int, *SLoginCommand)

func (*SLoginCommand) GetJSON

func (this *SLoginCommand) GetJSON() string

func (*SLoginCommand) GetMsgId

func (this *SLoginCommand) GetMsgId() uint16

func (*SLoginCommand) GetMsgName

func (this *SLoginCommand) GetMsgName() string

func (*SLoginCommand) GetSize

func (this *SLoginCommand) GetSize() int

func (*SLoginCommand) ReadBinary

func (this *SLoginCommand) ReadBinary(data []byte) int

func (*SLoginCommand) WriteBinary

func (this *SLoginCommand) WriteBinary(data []byte) int

type SLoginRetCommand

type SLoginRetCommand struct {
	Loginfailed uint32      // 是否连接成功,0成功
	Destination *ModuleInfo //	tcptask 所在服务器信息
}

SLoginRetCommand 登录服务器返回

func ReadMsgSLoginRetCommandByBytes

func ReadMsgSLoginRetCommandByBytes(indata []byte, obj *SLoginRetCommand) (int, *SLoginRetCommand)

func (*SLoginRetCommand) GetJSON

func (this *SLoginRetCommand) GetJSON() string

func (*SLoginRetCommand) GetMsgId

func (this *SLoginRetCommand) GetMsgId() uint16

func (*SLoginRetCommand) GetMsgName

func (this *SLoginRetCommand) GetMsgName() string

func (*SLoginRetCommand) GetSize

func (this *SLoginRetCommand) GetSize() int

func (*SLoginRetCommand) ReadBinary

func (this *SLoginRetCommand) ReadBinary(data []byte) int

func (*SLoginRetCommand) WriteBinary

func (this *SLoginRetCommand) WriteBinary(data []byte) int

type SLogoutCommand

type SLogoutCommand struct {
}

SLogoutCommand 通知服务器正常退出

func ReadMsgSLogoutCommandByBytes

func ReadMsgSLogoutCommandByBytes(indata []byte, obj *SLogoutCommand) (int, *SLogoutCommand)

func (*SLogoutCommand) GetJSON

func (this *SLogoutCommand) GetJSON() string

func (*SLogoutCommand) GetMsgId

func (this *SLogoutCommand) GetMsgId() uint16

func (*SLogoutCommand) GetMsgName

func (this *SLogoutCommand) GetMsgName() string

func (*SLogoutCommand) GetSize

func (this *SLogoutCommand) GetSize() int

func (*SLogoutCommand) ReadBinary

func (this *SLogoutCommand) ReadBinary(data []byte) int

func (*SLogoutCommand) WriteBinary

func (this *SLogoutCommand) WriteBinary(data []byte) int

type SNotifyAllInfo

type SNotifyAllInfo struct {
	ServerInfos []*ModuleInfo // 成功服务器信息
}

SNotifyAllInfo super 通知所有服务器配置信息

func ReadMsgSNotifyAllInfoByBytes

func ReadMsgSNotifyAllInfoByBytes(indata []byte, obj *SNotifyAllInfo) (int, *SNotifyAllInfo)

func (*SNotifyAllInfo) GetJSON

func (this *SNotifyAllInfo) GetJSON() string

func (*SNotifyAllInfo) GetMsgId

func (this *SNotifyAllInfo) GetMsgId() uint16

func (*SNotifyAllInfo) GetMsgName

func (this *SNotifyAllInfo) GetMsgName() string

func (*SNotifyAllInfo) GetSize

func (this *SNotifyAllInfo) GetSize() int

func (*SNotifyAllInfo) ReadBinary

func (this *SNotifyAllInfo) ReadBinary(data []byte) int

func (*SNotifyAllInfo) WriteBinary

func (this *SNotifyAllInfo) WriteBinary(data []byte) int

type SNotifySafelyQuit

type SNotifySafelyQuit struct {
	// 目标服务器的信息应该是最新的信息,目标服务器会将该信息改成最新的
	TargetServerInfo *ModuleInfo
}

SNotifySafelyQuit 通知说明的目标服务器安全退出 此消息发送的前提是当前存在可以替代目标服务器的服务器

func ReadMsgSNotifySafelyQuitByBytes

func ReadMsgSNotifySafelyQuitByBytes(indata []byte, obj *SNotifySafelyQuit) (int, *SNotifySafelyQuit)

func (*SNotifySafelyQuit) GetJSON

func (this *SNotifySafelyQuit) GetJSON() string

func (*SNotifySafelyQuit) GetMsgId

func (this *SNotifySafelyQuit) GetMsgId() uint16

func (*SNotifySafelyQuit) GetMsgName

func (this *SNotifySafelyQuit) GetMsgName() string

func (*SNotifySafelyQuit) GetSize

func (this *SNotifySafelyQuit) GetSize() int

func (*SNotifySafelyQuit) ReadBinary

func (this *SNotifySafelyQuit) ReadBinary(data []byte) int

func (*SNotifySafelyQuit) WriteBinary

func (this *SNotifySafelyQuit) WriteBinary(data []byte) int

type SROCBind

type SROCBind struct {
	HostModuleID string
	IsDelete     bool
	ObjType      string
	ObjIDs       []string
}

SROCBind ROC绑定信息

func ReadMsgSROCBindByBytes

func ReadMsgSROCBindByBytes(indata []byte, obj *SROCBind) (int, *SROCBind)

func (*SROCBind) GetJSON

func (this *SROCBind) GetJSON() string

func (*SROCBind) GetMsgId

func (this *SROCBind) GetMsgId() uint16

func (*SROCBind) GetMsgName

func (this *SROCBind) GetMsgName() string

func (*SROCBind) GetSize

func (this *SROCBind) GetSize() int

func (*SROCBind) ReadBinary

func (this *SROCBind) ReadBinary(data []byte) int

func (*SROCBind) WriteBinary

func (this *SROCBind) WriteBinary(data []byte) int

type SROCRequest

type SROCRequest struct {
	// 请求信息
	FromModuleID string
	ToModuleID   string
	Seq          int64
	// 调用信息
	CallStr    string
	CallArg    []byte
	NeedReturn bool
}

SROCRequest ROC调用请求

func ReadMsgSROCRequestByBytes

func ReadMsgSROCRequestByBytes(indata []byte, obj *SROCRequest) (int, *SROCRequest)

func (*SROCRequest) GetJSON

func (this *SROCRequest) GetJSON() string

func (*SROCRequest) GetMsgId

func (this *SROCRequest) GetMsgId() uint16

func (*SROCRequest) GetMsgName

func (this *SROCRequest) GetMsgName() string

func (*SROCRequest) GetSize

func (this *SROCRequest) GetSize() int

func (*SROCRequest) ReadBinary

func (this *SROCRequest) ReadBinary(data []byte) int

func (*SROCRequest) WriteBinary

func (this *SROCRequest) WriteBinary(data []byte) int

type SROCResponse

type SROCResponse struct {
	// 响应信息
	FromModuleID string
	ToModuleID   string
	ReqSeq       int64
	// 响应数据
	ResData []byte
	Error   string
}

SROCResponse ROC调用响应

func ReadMsgSROCResponseByBytes

func ReadMsgSROCResponseByBytes(indata []byte, obj *SROCResponse) (int, *SROCResponse)

func (*SROCResponse) GetJSON

func (this *SROCResponse) GetJSON() string

func (*SROCResponse) GetMsgId

func (this *SROCResponse) GetMsgId() uint16

func (*SROCResponse) GetMsgName

func (this *SROCResponse) GetMsgName() string

func (*SROCResponse) GetSize

func (this *SROCResponse) GetSize() int

func (*SROCResponse) ReadBinary

func (this *SROCResponse) ReadBinary(data []byte) int

func (*SROCResponse) WriteBinary

func (this *SROCResponse) WriteBinary(data []byte) int

type SReqCloseConnect

type SReqCloseConnect struct {
	FromModuleID string
	ToModuleID   string
	ClientConnID string
}

SReqCloseConnect 关闭客户端连接的请求

func ReadMsgSReqCloseConnectByBytes

func ReadMsgSReqCloseConnectByBytes(indata []byte, obj *SReqCloseConnect) (int, *SReqCloseConnect)

func (*SReqCloseConnect) GetJSON

func (this *SReqCloseConnect) GetJSON() string

func (*SReqCloseConnect) GetMsgId

func (this *SReqCloseConnect) GetMsgId() uint16

func (*SReqCloseConnect) GetMsgName

func (this *SReqCloseConnect) GetMsgName() string

func (*SReqCloseConnect) GetSize

func (this *SReqCloseConnect) GetSize() int

func (*SReqCloseConnect) ReadBinary

func (this *SReqCloseConnect) ReadBinary(data []byte) int

func (*SReqCloseConnect) WriteBinary

func (this *SReqCloseConnect) WriteBinary(data []byte) int

type SSeverStartOKCommand

type SSeverStartOKCommand struct {
	ModuleID string
}

SSeverStartOKCommand 通知我所连接的服务器启动成功

func ReadMsgSSeverStartOKCommandByBytes

func ReadMsgSSeverStartOKCommandByBytes(indata []byte, obj *SSeverStartOKCommand) (int, *SSeverStartOKCommand)

func (*SSeverStartOKCommand) GetJSON

func (this *SSeverStartOKCommand) GetJSON() string

func (*SSeverStartOKCommand) GetMsgId

func (this *SSeverStartOKCommand) GetMsgId() uint16

func (*SSeverStartOKCommand) GetMsgName

func (this *SSeverStartOKCommand) GetMsgName() string

func (*SSeverStartOKCommand) GetSize

func (this *SSeverStartOKCommand) GetSize() int

func (*SSeverStartOKCommand) ReadBinary

func (this *SSeverStartOKCommand) ReadBinary(data []byte) int

func (*SSeverStartOKCommand) WriteBinary

func (this *SSeverStartOKCommand) WriteBinary(data []byte) int

type SStartMyNotifyCommand

type SStartMyNotifyCommand struct {
	ModuleInfo *ModuleInfo // 启动成功服务器信息
}

SStartMyNotifyCommand 启动验证通过通知其它服务器我的新

func ReadMsgSStartMyNotifyCommandByBytes

func ReadMsgSStartMyNotifyCommandByBytes(indata []byte, obj *SStartMyNotifyCommand) (int, *SStartMyNotifyCommand)

func (*SStartMyNotifyCommand) GetJSON

func (this *SStartMyNotifyCommand) GetJSON() string

func (*SStartMyNotifyCommand) GetMsgId

func (this *SStartMyNotifyCommand) GetMsgId() uint16

func (*SStartMyNotifyCommand) GetMsgName

func (this *SStartMyNotifyCommand) GetMsgName() string

func (*SStartMyNotifyCommand) GetSize

func (this *SStartMyNotifyCommand) GetSize() int

func (*SStartMyNotifyCommand) ReadBinary

func (this *SStartMyNotifyCommand) ReadBinary(data []byte) int

func (*SStartMyNotifyCommand) WriteBinary

func (this *SStartMyNotifyCommand) WriteBinary(data []byte) int

type SStartRelyNotifyCommand

type SStartRelyNotifyCommand struct {
	ServerInfos []*ModuleInfo // 启动成功服务器信息
}

SStartRelyNotifyCommand super通知其它服务器启动成功

func ReadMsgSStartRelyNotifyCommandByBytes

func ReadMsgSStartRelyNotifyCommandByBytes(indata []byte, obj *SStartRelyNotifyCommand) (int, *SStartRelyNotifyCommand)

func (*SStartRelyNotifyCommand) GetJSON

func (this *SStartRelyNotifyCommand) GetJSON() string

func (*SStartRelyNotifyCommand) GetMsgId

func (this *SStartRelyNotifyCommand) GetMsgId() uint16

func (*SStartRelyNotifyCommand) GetMsgName

func (this *SStartRelyNotifyCommand) GetMsgName() string

func (*SStartRelyNotifyCommand) GetSize

func (this *SStartRelyNotifyCommand) GetSize() int

func (*SStartRelyNotifyCommand) ReadBinary

func (this *SStartRelyNotifyCommand) ReadBinary(data []byte) int

func (*SStartRelyNotifyCommand) WriteBinary

func (this *SStartRelyNotifyCommand) WriteBinary(data []byte) int

type STestCommand

type STestCommand struct {
	Testno     uint32
	Testttring string // IP
}

STestCommand 测试消息请求

func ReadMsgSTestCommandByBytes

func ReadMsgSTestCommandByBytes(indata []byte, obj *STestCommand) (int, *STestCommand)

func (*STestCommand) GetJSON

func (this *STestCommand) GetJSON() string

func (*STestCommand) GetMsgId

func (this *STestCommand) GetMsgId() uint16

func (*STestCommand) GetMsgName

func (this *STestCommand) GetMsgName() string

func (*STestCommand) GetSize

func (this *STestCommand) GetSize() int

func (*STestCommand) ReadBinary

func (this *STestCommand) ReadBinary(data []byte) int

func (*STestCommand) WriteBinary

func (this *STestCommand) WriteBinary(data []byte) int

type STimeTickCommand

type STimeTickCommand struct {
	Testno uint32
}

STimeTickCommand 心跳包请求

func ReadMsgSTimeTickCommandByBytes

func ReadMsgSTimeTickCommandByBytes(indata []byte, obj *STimeTickCommand) (int, *STimeTickCommand)

func (*STimeTickCommand) GetJSON

func (this *STimeTickCommand) GetJSON() string

func (*STimeTickCommand) GetMsgId

func (this *STimeTickCommand) GetMsgId() uint16

func (*STimeTickCommand) GetMsgName

func (this *STimeTickCommand) GetMsgName() string

func (*STimeTickCommand) GetSize

func (this *STimeTickCommand) GetSize() int

func (*STimeTickCommand) ReadBinary

func (this *STimeTickCommand) ReadBinary(data []byte) int

func (*STimeTickCommand) WriteBinary

func (this *STimeTickCommand) WriteBinary(data []byte) int

type SUpdateSession

type SUpdateSession struct {
	FromModuleID string
	ToModuleID   string
	ClientConnID string
	SessionUUID  string
	Session      map[string]string
}

SUpdateSession 更新Session的请求

func ReadMsgSUpdateSessionByBytes

func ReadMsgSUpdateSessionByBytes(indata []byte, obj *SUpdateSession) (int, *SUpdateSession)

func (*SUpdateSession) GetJSON

func (this *SUpdateSession) GetJSON() string

func (*SUpdateSession) GetMsgId

func (this *SUpdateSession) GetMsgId() uint16

func (*SUpdateSession) GetMsgName

func (this *SUpdateSession) GetMsgName() string

func (*SUpdateSession) GetSize

func (this *SUpdateSession) GetSize() int

func (*SUpdateSession) ReadBinary

func (this *SUpdateSession) ReadBinary(data []byte) int

func (*SUpdateSession) WriteBinary

func (this *SUpdateSession) WriteBinary(data []byte) int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL