コード例 #1
0
        public bool Run(string addr)
        {
            Console.WriteLine("Breakin' In... (" + addr + ")");

            Console.WriteLine("=== Listeners ===");

            try
            {
                Redirector = new RedirectorServer(11100, addr, 10901);
                Console.WriteLine("RedirectorUS: OK!");
            }
            catch (Exception e)
            {
                Console.WriteLine("RedirectorUS: Failed to start! Exception:");
                Console.WriteLine(e.ToString());
                return(false);
            }

            try
            {
                Redirector = new RedirectorServer(11140, addr, 10901);
                Console.WriteLine("RedirectorEU: OK!");
            }
            catch (Exception e)
            {
                Console.WriteLine("RedirectorEU: Failed to start! Exception:");
                Console.WriteLine(e.ToString());
                return(false);
            }

            try
            {
                Redirector = new RedirectorServer(11110, addr, 10901);
                Console.WriteLine("RedirectorJP: OK!");
            }
            catch (Exception e)
            {
                Console.WriteLine("RedirectorJP: Failed to start! Exception:");
                Console.WriteLine(e.ToString());
                return(false);
            }

            try
            {
                Matchmaker = new MatchmakerServer(10901);
                Console.WriteLine("Matchmaker: OK!");
            }
            catch (Exception e)
            {
                Console.WriteLine("Matchmaker: Failed to start! Exception:");
                Console.WriteLine(e.ToString());
                Redirector.Dispose();
                return(false);
            }

            //main loop? no purpose right now
            Console.WriteLine("=================");

            return(true);
        }
コード例 #2
0
        public EAClient(AbstractEAServer context, TcpClient client)
        {
            Context = context;
            Client  = client;
            IP      = ((IPEndPoint)client.Client.RemoteEndPoint).Address.ToString();

            Console.WriteLine("New connection from " + IP + ".");

            RecvThread = new Thread(RunLoop);
            RecvThread.Start();
        }
コード例 #3
0
ファイル: TSBOServer.cs プロジェクト: JMF386/BurnoutEmu
        public bool Run(string addr)
        {
            Console.WriteLine("Burnout Server Emulator v0.1 by VTSTech (" + addr + ")");

            Console.WriteLine("=== Listeners ===");

            try
            {
                //Redirector = new RedirectorServer(11100, addr, 10901);
                Redirector = new RedirectorServer(21840, addr, 10901); //Burnout 3 PAL Review
                //Redirector = new RedirectorServer(21801, addr, 10901); //Burnout 3 NTSC Retail
                //Redirector = new RedirectorServer(21800, addr, 10901); //Burnout 3 PAL Retail
                //Redirector = new RedirectorServer(21870, addr, 10901); //Burnout Paradise
                //Redirector = new RedirectorServer(10900, addr, 10901); //Need for Speed Underground
                Console.WriteLine("Redirector: OK!");
            }
            catch (Exception e)
            {
                Console.WriteLine("Redirector: Failed to start! Exception:");
                Console.WriteLine(e.ToString());
                return(false);
            }

            try
            {
                Matchmaker = new MatchmakerServer(10901);
                Console.WriteLine("Matchmaker: OK!");
            }
            catch (Exception e)
            {
                Console.WriteLine("Matchmaker: Failed to start! Exception:");
                Console.WriteLine(e.ToString());
                Redirector.Dispose();
                return(false);
            }

            //main loop? no purpose right now
            Console.WriteLine("=================");

            return(true);
        }