예제 #1
0
        // Works
        private static void ClientMethod2()
        {
            string request     = "GET";
            string HCN         = "1231321321";
            string vCode       = "ZZ";
            string postalCode  = "A1N1N1";
            string finalString = request + " " + HCN + "," + vCode + "," + postalCode + "<EOF>";

            Console.WriteLine("{0}", finalString);

            AsynchronousClient client2 = new AsynchronousClient("client2");

            client2.StartClient("127.0.0.1");
            client2.SendMessage("GET 1134567983,BA,N2H4J2/1234567981,AB,N2H4J4/1234567982,AC,N2H3J5");
            string client2Response = client2.ReceiveMessage();

            Console.WriteLine("\n--------------------------------------------");
            Console.WriteLine("\nClient 2 received: {0}\n", client2Response);
            Console.WriteLine("--------------------------------------------\n");
            if (client2Response != "VCODE")
            {
                numberOfErrors2++;
            }
        }