示例#1
0
        public ConsoleProcess(ref PacketQueue packets)
        {
            //recordSession = new RecordTrack();
            //displayConsole = new DisplayTrack();
            //recordSession = new Record();
            //displayConsole = new Display();
            recordSession  = new RecordMap();
            displayConsole = new DisplayMap();

            this.packets = packets;
            capture      = new Capture(recordSession, displayConsole);
        }
        public static void Main()
        {
            //Test test = new Test();

            var packetQueue    = new PacketQueue();
            var udpProcess     = new UDPProcess(ref packetQueue);
            var consoleProcess = new ConsoleProcess(ref packetQueue);

            var udpThread     = new Thread(new ThreadStart(udpProcess.Process));
            var consoleThread = new Thread(new ThreadStart(consoleProcess.Process));

            udpThread.Start();
            consoleThread.Start();

            Console.Read();

            udpThread.Abort();
            consoleThread.Abort();

            return;
        }
 public ConsoleProcess(ref PacketQueue packets, IAction action)
 {
     this.action  = action;
     this.packets = packets;
 }
 public UDPProcess(ref PacketQueue packets)
 {
     reader       = new UDPNonBlockingReader(5606);
     this.packets = packets;
 }