Пример #1
0
func (this *SClientUser) ProcMsg_CmdGate2GateConfig_GetServerConfigReq() (err error) {
	GSLog.Debugln("ProcMsg_CmdGate2GateConfig_GetServerConfigReq")

	recvMsg := new(bsn_msg_gate_gateconfig.SGate2GateConfig_GetServerConfigReq)
	if err = proto.Unmarshal(this.M_by2MsgBody, recvMsg); err != nil {
		return
	}

	sendMsg := &bsn_msg_gate_gateconfig.SGateConfig2Gate_GetServerConfigRes{
		VSServerConfigs: []*bsn_msg_gate_gateconfig.SServerConfig{
			&bsn_msg_gate_gateconfig.SServerConfig{
				Vcommon_EServerType: bsn_define.EServerType_ServerType_Echo.Enum(),
				VstrAddr:            proto.String("localhost:" + strconv.Itoa(int(bsn_common.ServerPort(uint32(bsn_define.EServerType_ServerType_Echo), this.UserMgr().UserMgr().App().Id())))),
			},
		},
	}
	return this.SendPbMsgWithSMsgHeader(bsn_common.TMsgType(bsn_msg_gate_gateconfig.ECmdGateConfig2Gate_CmdGateConfig2Gate_GetServerConfigRes), sendMsg)
}
Пример #2
0
Файл: app.go Проект: bsn069/go
func (this *SApp) ConfigListenPort() uint16 {
	return bsn_common.ServerPort(uint32(GServerType), this.Id())
}