Пример #1
0
func (this *SServerUser) NetConnecterWithMsgHeaderImpProcMsg() error {
	GSLog.Debugln("NetConnecterWithMsgHeaderImpProcMsg")
	GSLog.Debugln(this.M_SMsgHeader)
	GSLog.Debugln(this.M_by2MsgBody)

	msgType := this.MsgType()

	if bsn_msg.IsMsgSys(msgType) {
		return this.procSysMsg(bsn_define.ECmd(msgType))
	}

	return this.procServerMsg(bsn_msg_gate_server.ECmdServe2Gate(msgType))
}
Пример #2
0
func (this *SClientUser) procMsg() error {
	GSLog.Debugln(this.M_SMsgHeader)
	GSLog.Debugln(this.M_by2MsgBody)

	msgType := this.MsgType()

	if bsn_msg.IsMsgSys(msgType) {
		return this.procSysMsg(bsn_define.ECmd(msgType))
	}

	if IsMsgGate(msgType) {
		return this.procGateMsg(bsn_msg_gate_server.ECmdGate2Server(msgType))
	}

	return errors.New(fmt.Sprintf("unknown msg type = %v", msgType))
}
Пример #3
0
func (this *SClientUser) procMsg() error {
	GSLog.Debugln(this.M_SMsgHeader)
	GSLog.Debugln(this.M_by2MsgBody)

	msgType := this.MsgType()

	if bsn_msg.IsMsgSys(msgType) {
		return this.procSysMsg(bsn_define.ECmd(msgType))
	}

	if IsMsgClient(msgType) {
		return this.procClientMsg(bsn_msg_client_gate.ECmdClient2Gate(msgType))
	}

	return this.UserMgr().UserMgr().ServerUserMgr().OnClientMsg(this)
}
Пример #4
0
func (this *SServerUserGateConfig) NetConnecterWithMsgHeaderImpProcMsg() error {
	GSLog.Debugln("NetConnecterWithMsgHeaderImpProcMsg")
	GSLog.Debugln(this.M_SMsgHeader)
	GSLog.Debugln(this.M_by2MsgBody)

	msgType := this.MsgType()

	if bsn_msg.IsMsgSys(msgType) {
		return this.procSysMsg(bsn_define.ECmd(msgType))
	}

	if IsMsgGateConfig(msgType) {
		return this.procGateConfigMsg(bsn_msg_gate_gateconfig.ECmdGateConfig2Gate(msgType))
	}

	return errors.New(fmt.Sprintf("unknown msg type = %v", msgType))
}
Пример #5
0
func (this *SServerUserGate) NetConnecterWithMsgHeaderImpProcMsg() error {
	GSLog.Debugln("NetConnecterWithMsgHeaderImpProcMsg")
	GSLog.Debugln(this.M_SMsgHeader)
	GSLog.Debugln(this.M_by2MsgBody)

	msgType := this.MsgType()

	if bsn_msg.IsMsgSys(msgType) {
		return this.procSysMsg(bsn_define.ECmd(msgType))
	}

	if IsMsgGate(msgType) {
		return this.procGateMsg(bsn_msg_client_gate.ECmdGate2Client(msgType))
	}

	if IsMsgEchoServer(msgType) {
		return this.procEchoServerMsg(bsn_msg_client_echo_server.ECmdEchoServe2Client(msgType))
	}

	return errors.New(fmt.Sprintf("unknown msg type = %v", msgType))
}