예제 #1
0
파일: Test.cs 프로젝트: briandealwis/gt
        public Test()
        {
            Client client = new Client();
            Thread t = client.StartListeningOnSeperateThread(10);

            string name = Prompt.Show("What is your name?");

            if (name == null)
                return;

            LobbyClient lobby = new LobbyClient(name,
                new SimpleSharedDictionary(
                    client.OpenBinaryChannel("127.0.0.1","9999", 0)));
            Console.WriteLine("Lobby started.");
            lobby.ShowDialog();

            t.Abort();

            if (lobby.JoinedServer != null)
            {
                Console.WriteLine("We should connect to " + lobby.JoinedServer.IPAddress + ":" + lobby.JoinedServer.Port);
            }
        }