Exemple #1
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();
        }
Exemple #2
0
        public bool Run(string addr)
        {
            Console.WriteLine("Breakin' In... (" + addr + ")");

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

            try
            {
                Redirector = new RedirectorServer(11100, addr, 10901);
                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);
        }