Exemplo n.º 1
0
        /// <summary>
        /// Main service start method.
        /// </summary>
        internal static void Main()
        {
            Logger.Initialize();

            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

            CacheServiceConnection.Initialize
            (
                new IPEndPoint
                (
                    IPAddress.Parse
                    (
                        Settings.Default.CacheServiceAddress),
                    Settings.Default.CacheServicePort
                ),
                Settings.Default.CacheServiceReconnectInterval
            );

            GameServiceConnection.Initialize
            (
                new IPEndPoint
                (

                    IPAddress.Parse
                    (
                        Settings.Default.GameServiceAddress),
                    Settings.Default.GameServicePort),
                Settings.Default.GameServiceReconnectInterval
            );

            while (Console.ReadKey(true) != null)
            {
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Main service start method.
        /// </summary>
        internal static void Main()
        {
            // initializing logger
            Logger.Initialize();

            // setting unhandled exceptions handler
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

            // initializing user connections listener
            UserConnectionsListener.Initialize
            (
                new IPEndPoint
                (
                    IPAddress.Parse(Settings.Default.LoginServiceAddress),
                    Settings.Default.LoginServicePort
                ),
                Settings.Default.LoginServiceBacklog,
                Settings.Default.LoginServiceEnableFirewall
            );

            // initializing cache server connection
            CacheServiceConnection.Initialize
            (
                new IPEndPoint
                (
                    IPAddress.Parse(Settings.Default.CacheServiceAddress),
                    Settings.Default.CacheServicePort
                ),
                Settings.Default.CacheServiceReconnectInterval);

            while (Console.ReadKey(true) != null)
            {
            }
        }