Пример #1
0
 /// <summary>
 /// Initializes a new instance of the MetInfoFile class.
 /// </summary>
 /// <param name="fileName">File name.</param>
 public MetaInfoFile(string fileName)
 {
     try
     {
         TorrentFileName = fileName;
         metaInfoDict    = new Dictionary <string, byte[]>();
         _Bencode        = new Bencode();
         Load();
     }
     catch (Exception ex)
     {
         throw new BitTorrentException(ex.Message);
     }
 }
Пример #2
0
 /// <summary>
 /// Setup data and resources needed by HTTP tracker.
 /// </summary>
 /// <param name="trackerURL"></param>
 public AnnouncerHTTP(string _, IWeb web)
 {
     _web     = web;
     _Bencode = new Bencode();
 }