Ejemplo n.º 1
0
        // ReSharper restore InconsistentNaming
        private static void Main()
        {
            Console.TreatControlCAsInput = false;
            Console.CancelKeyPress += CtrlC;

            Logger log = new Logger(Config.LogFolder);

            sv = new Server(log, Config.Port);
            sv.Start();

            Console.Title = "";
        }
Ejemplo n.º 2
0
        /// <summary>
        ///   Constructor
        /// </summary>
        /// <param name="log"> Logger instance </param>
        /// <param name="port"> Port to listen on </param>
        internal Server(Logger log, int port = 9993)
        {
            _server = this;
            _log = log;
            _database = new Database(Config.DbHost, Config.DbUser, Config.DbPass, Config.DbName, _log);
            _localNetService = new LocalNetworkService(log, Config.LocalNetPort);
            _netService = new NetworkService(log, port);

            Console.Clear();
            Console.Title = string.Format("Metin2 Auth Server Emulator [Version {0}]",
                                          Assembly.GetExecutingAssembly().GetName().Version);

            Console.WriteLine("Metin2 Auth Server Emulator [Version {0}]\n",
                              Assembly.GetExecutingAssembly().GetName().Version);
        }