public void Setup()
 {
     pair = new ConnectionPair(55432);
     rig  = TestRig.CreateMultiFile();
     rig.Manager.HashChecked = true;
     rig.Manager.Start();
 }
Exemple #2
0
 public TestEncryption()
 {
     conn = new ConnectionPair(13253);
     conn.Incoming.Name = "Incoming";
     conn.Outgoing.Name = "Outgoing";
     rig.Engine.Settings.AllowedEncryption = EncryptionTypes.All;
     rig.Manager.HashChecked = true;
 }
 public NetworkIOTests()
 {
     if (data == null)
     {
         data = new byte [32768];
         new Random().NextBytes(data);
     }
     pair = new ConnectionPair(34567);
 }
Exemple #4
0
 public void Setup()
 {
     if (data == null)
     {
         data = new byte [32768];
         new Random().NextBytes(data);
     }
     pair = new ConnectionPair(34567);
 }
Exemple #5
0
        public void Setup(bool metadataMode, string metadataPath)
        {
            pair             = new ConnectionPair(55432);
            rig              = TestRig.CreateSingleFile(1024 * 1024 * 1024, 32768, metadataMode);
            rig.MetadataPath = metadataPath;
            rig.RecreateManager();

            rig.Manager.HashChecked = true;
            rig.Manager.Start();
            rig.AddConnection(pair.Outgoing);

            var    connection = pair.Incoming;
            PeerId id         = new PeerId(new Peer("", connection.Uri), rig.Manager);

            id.Connection = connection;
            byte[] data;

            EncryptorFactory.EndCheckEncryption(EncryptorFactory.BeginCheckEncryption(id, 68, null, null, new InfoHash[] { id.TorrentManager.InfoHash }), out data);
            decryptor = id.Decryptor;
            encryptor = id.Encryptor;
        }
 public void Setup()
 {
     rig  = TestRig.CreateMultiFile(new TestWriter());
     conn = new ConnectionPair(51515);
 }
 public TorrentManagerTest()
 {
     rig  = TestRig.CreateMultiFile(new TestWriter());
     conn = new ConnectionPair(51515);
 }