private void RegistBattleServer(INetworkChannel networkChannel) { _clientChannel = networkChannel; var msg = RegisterBattleServerMessage.Allocate(); msg.Id = SingletonManager.Get <ServerFileSystemConfigManager>().BootConfig.Id; msg.Ip = SingletonManager.Get <ServerFileSystemConfigManager>().BootConfig.Ip; msg.GameMapId = SingletonManager.Get <ServerFileSystemConfigManager>().BootConfig.MapId; msg.RoomPort = SingletonManager.Get <ServerFileSystemConfigManager>().BootConfig.HallRoomServer.ListenPort; msg.BattleTcpPort = SingletonManager.Get <ServerFileSystemConfigManager>().BootConfig.BattleServer.TcpPort; msg.BattleUdpPort = SingletonManager.Get <ServerFileSystemConfigManager>().BootConfig.BattleServer.UdpPort; _logger.InfoFormat("Register Battle Server, Id {0} Ip {1} GameMap Id {2} Room Port {3}, Tcp {4} Udp {5}", msg.Id, msg.Ip, msg.GameMapId, msg.RoomPort, msg.BattleTcpPort, msg.BattleUdpPort); SendRegisterBattleServerMessage(msg); //空闲状态 // UpdateBattleServerStatus(0); }
private void SendRegisterBattleServerMessage(RegisterBattleServerMessage msg) { SendAndReleaseMessage(_clientChannel, RpcMessageType.RegisterBattleServer, msg); }