Пример #1
0
        /// <summary>
        /// Start downloading a queue entry
        /// this will send connection requests to every source of
        /// the entry
        /// </summary>
        /// <param name="me">the queue entry to start downloading to</param>
        public void StartDownload(Queue.QueueEntry me)
        {
            //TODO change this back to thread safe enumerator in the queue class
            if (me == null)
            {
                return;
            }
            me.StartDownload();


            /*            lock (me.SourcesLock)
             * {//TODO put this in queue class
             *  foreach (Queue.QueueEntry.Source source in me.Sources)
             *  {
             *      if (source.HasHub && source.IsOnline && !CheckForUserInPeers(source.UserName))
             *      {
             *          source.Hub.SendConnectToMe(source.UserName); //signal download to hub to start it
             *      }
             *  }
             * }
             * //sources strategy
             * //for selection and skipping if source offline
             * //source offline detection
             *
             * //result.Hub.SendCommand("ConnectToMe", result.UserName); //signal download to hub to start it
             * //Console.WriteLine("Hub was not resolved from result hub address: " + result.HubAddress);
             */
        }
Пример #2
0
 /// <summary>
 /// TODO Work in progress
 /// </summary>
 /// <param name="me"></param>
 public void GetTTHL(Queue.QueueEntry me)
 {
     //if (me == null) return;
     me.WantTTHL = true;
     me.StartDownload();
 }