Ignore:
Timestamp:
Jun 26, 2010, 9:51:11 PM (11 years ago)
Author:
Paul Lelgemann
Message:

o KeySearcher: more precise statistics in the new visualization of distributed search

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/KeySearcher/KeySearcher.cs

    r1705 r1707  
    619619        {
    620620            GuiLogMessage("Launching p2p based bruteforce logic...", NotificationLevel.Info);
    621             ValidateConnectionToPeerToPeerSystem();
    622621
    623622            try
     
    633632            }
    634633        }
    635 
    636 
    637         #region P2P connection validation
    638 
    639         private void ValidateConnectionToPeerToPeerSystem()
    640         {
    641             if (P2PManager.IsConnected)
    642             {
    643                 return;
    644             }
    645 
    646             if(settings.AutoconnectPeerToPeer)
    647             {
    648                 HandleAutoconnect();
    649             } else
    650             {
    651                 GuiLogMessage("P2P network not connected and autoconnect disabled. Cannot compute job.",
    652                               NotificationLevel.Error);
    653             }
    654         }
    655 
    656         private void HandleAutoconnect()
    657         {
    658             P2PManager.ConnectionManager.OnP2PConnectionStateChangeOccurred += HandleConnectionStateChange;
    659             connectResetEvent = new AutoResetEvent(false);
    660 
    661             P2PManager.Connect();
    662 
    663             connectResetEvent.WaitOne();
    664 
    665             if (P2PManager.IsConnected)
    666             {
    667                 GuiLogMessage("P2P network was connected due to plugin setting.",
    668                               NotificationLevel.Info);
    669             }
    670             else
    671             {
    672                 GuiLogMessage("P2P network could not be connected.",
    673                               NotificationLevel.Error);
    674             }
    675         }
    676 
    677         void HandleConnectionStateChange(object sender, bool newState)
    678         {
    679             connectResetEvent.Set();
    680         }
    681 
    682         #endregion
    683634
    684635        internal LinkedList<ValueKey> BruteForceWithLocalSystem(KeyPattern.KeyPattern pattern, bool redirectResultsToStatisticsGenerator = false)
Note: See TracChangeset for help on using the changeset viewer.