Beispiel #1
0
        private void BtnTodaySalesSend_Click(object sender, RoutedEventArgs e)
        {
            String id = App.LogedID;

            if (AsynchronousClient.isLogin == false)
            {
                MessageBox.Show("서버가 종료되어있습니다.");
                return;
            }
            AsynchronousClient.SendMessage("@" + id + "#오늘 판매량:" + todaySales.ToString() + "원");
            MessageBox.Show("전송 되었습니다!", "빽다방");
        }
Beispiel #2
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++;
            }
        }