OctoTorrent.SampleClient.EngineTestRig.AddConnection C# (CSharp) Method

AddConnection() public method

public AddConnection ( IConnection connection ) : void
connection IConnection
return void
        public void AddConnection(IConnection connection)
        {
            _listener.Add(_manager, connection);
        }

Usage Example

Exemplo n.º 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);
            }
        }
All Usage Examples Of OctoTorrent.SampleClient.EngineTestRig::AddConnection