Esempio n. 1
0
        static void Main(string[] args)
        {
            MyChatClient client = new MyChatClient("localhost", 8181);

            client.connect();
            String message = String.Empty;

            while (message != "bye!")
            {
                message = Console.ReadLine();
                client.sendMessage(message);
            }
            client.disconnect();
            Console.WriteLine("\nPress Enter to exit...");
            Console.Read();
        }
Esempio n. 2
0
            public void Test_Connecting_To_Bad_Server()
            {
                MyChatClient client = new MyChatClient("localhost_doesnot_exist", 65535);

                client.connect();
            }