예제 #1
0
        static void Main(string[] args)
        {
            string file  = "D:/Projects/COMNet/large_text.txt";
            var    input = ReadFile(file);

            var com1 = ConfigurationManager.AppSettings["com1"];
            var com2 = ConfigurationManager.AppSettings["com2"];
            var name = ConfigurationManager.AppSettings["name"];

            byte size = (byte)FrameFactory.FieldType.ACK;

            Console.WriteLine("AAAA: {0}", size.ToString());

            PC WS = new PC(name, com1, com2);

            WS.Login();
            Console.WriteLine("Actions: [send] [wait]");
            string choice = "";

            while (choice != "exit")
            {
                choice = Console.ReadLine();
                if (choice == "send")
                {
                    WS.WriteBuff(input);
                }
                else if (choice == "check")
                {
                    WS.CheckBuffers();
                }
            }
            Console.ReadKey();
        }