Пример #1
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;
        }
Пример #2
0
 public void Setup()
 {
     pair = new ConnectionPair(55432);
     rig = TestRig.CreateMultiFile();
     rig.Manager.HashChecked = true;
     rig.Manager.Start();
 }
Пример #3
0
 public void Setup()
 {
     rig = TestRig.CreateMultiFile (new TestWriter());
     conn = new ConnectionPair(51515);
 }
Пример #4
0
 public void Setup()
 {
     if (data == null) {
         data = new byte [32768];
         new Random ().NextBytes (data);
     }
     pair = new ConnectionPair (34567);
 }
Пример #5
0
 public void Setup()
 {
     conn = new ConnectionPair(13253);
     conn.Incoming.Name = "Incoming";
     conn.Outgoing.Name = "Outgoing";
     rig.Engine.Settings.AllowedEncryption = EncryptionTypes.All;
     rig.Manager.HashChecked = true;
 }