Changeset 1580


Ignore:
Timestamp:
Jun 3, 2010, 4:34:22 PM (11 years ago)
Author:
Paul Lelgemann
Message:

+ Introduced dirty hack to shutdown the peer-to-peer network in CrypWin

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypP2P/P2PManager.cs

    r1579 r1580  
    2222using Cryptool.PluginBase.Miscellaneous;
    2323using Cryptool.Plugins.PeerToPeer.Internal;
    24 using PeersAtPlay;
    2524using PeersAtPlay.P2PStorage.DHT;
    2625using PeersAtPlay.Util.Threading;
     
    3837            P2PBase = new P2PBase();
    3938
    40             // Register events
    41 
    4239            // to forward event from overlay/dht MessageReceived-Event from P2PBase
    4340            P2PBase.OnP2PMessageReceived += OnP2PMessageReceived;
    44 
    45             // Register exit event to terminate P2P connection without loosing data
    46             // TODO check if this is correct, should be - but handler is not called (and application does not shut down), probably unrelated to this problem
    47             Application.ApplicationExit += HandleDisconnectByApplicationShutdown;
    4841        }
    4942
     
    132125
    133126        #region Framework methods
    134 
    135         private void HandleDisconnectByApplicationShutdown(object sender, EventArgs e)
    136         {
    137             if (IsP2PConnected())
    138             {
    139                 new ConnectionWorker(P2PBase).Start();
    140             }
    141         }
    142127
    143128        public void GuiLogMessage(string message, NotificationLevel logLevel)
     
    272257
    273258        #endregion DHT operations (non-blocking)
     259
     260        public void HandleShutdown()
     261        {
     262            if (IsP2PConnected())
     263            {
     264                new ConnectionWorker(P2PBase).Start();
     265            }
     266        }
    274267    }
    275268
  • trunk/CrypStartup/CrypStartup.csproj

    r1501 r1580  
    152152  </ItemGroup>
    153153  <ItemGroup>
    154     <ProjectReference Include="..\CrypP2P\CrypP2P.csproj">
    155       <Project>{7D3E4C88-7EA8-45EA-AC1E-FC8ED8EDDB7A}</Project>
    156       <Name>CrypP2P</Name>
    157     </ProjectReference>
    158154    <ProjectReference Include="..\CrypPluginBase\CrypPluginBase.csproj">
    159155      <Project>{25DB2B47-A457-4EC2-960B-395CE07AE093}</Project>
Note: See TracChangeset for help on using the changeset viewer.