Пример #1
0
        public TestManualConnection()
        {
            _rig1 = new EngineTestRig("Downloads1");
            _rig1.Manager.Start();
            _rig2 = new EngineTestRig("Downloads2");
            _rig2.Manager.Start();

            var p = new ConnectionPair(5151);

            _rig1.AddConnection(p.Incoming);
            _rig2.AddConnection(p.Outgoing);

            while (true)
            {
                Console.WriteLine("Connection 1A active: {0}", p.Incoming.Connected);
                Console.WriteLine("Connection 2A active: {0}", p.Outgoing.Connected);
                Thread.Sleep(1000);
            }
        }
Пример #2
0
        public TestManualConnection()
        {
            _rig1 = new EngineTestRig("Downloads1");
            _rig1.Manager.Start();
            _rig2 = new EngineTestRig("Downloads2");
            _rig2.Manager.Start();

            var p = new ConnectionPair(5151);

            _rig1.AddConnection(p.Incoming);
            _rig2.AddConnection(p.Outgoing);

            while (true)
            {
                Console.WriteLine("Connection 1A active: {0}", p.Incoming.Connected);
                Console.WriteLine("Connection 2A active: {0}", p.Outgoing.Connected);
                Thread.Sleep(1000);
            }
        }