public static BattleServer StartNew(CustomSevSetting setting) { ProtocolManager.InitCodeGenerator(0xB001, 0xB001); var sev = new BattleServer(setting); var ipa = string.IsNullOrEmpty(setting.host) ? IPAddress.Any : IPAddress.Parse(setting.host); sev.Start(new IPEndPoint(ipa, setting.port)); return(sev); }
static void Main(string[] args) { TypeUtil.ParseArgsUpdateObject(Config.SevSetting, args, (argv) => { Console.WriteLine("parse[{0}] failed!", argv); }); Console.Title = string.Format("BattleServer-{0}", Config.SevSetting.port); var cr = new ConsoleRunning(); BattleServer.StartNew(Config.SevSetting); cr.StartUp(OnInputed); }