Ignore:
Timestamp:
Oct 28, 2009, 3:09:01 PM (12 years ago)
Author:
arnold
Message:

Update von P2PPlugins (DHTremove hat noch einen Fehler, daher wurde die Funktionalität auskommentiert).

Location:
trunk/CrypPlugins/PeerToPeerBase
Files:
3 added
2 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/PeerToPeerBase/P2PPeer.cs

    r789 r794  
    2828{
    2929    [Author("Christian Arnold", "arnold@cryptool.org", "Uni Duisburg-Essen", "http://www.uni-due.de")]
    30     [PluginInfo(false, "P2P_Peer", "Creates a new Peer", "", "PeerToPeerBase/ct2_p2p_load_medium.png")]
     30    [PluginInfo(false, "P2P_Peer", "Creates a new Peer", "", "PeerToPeerBase/ct2_p2p_system_icon_medium.png")]
    3131    public class P2PPeer : IIOMisc
    3232    {
     
    144144        #region In and Output
    145145
    146         private IP2PControl p2pMaster;
    147         [PropertyInfo(Direction.ControlMaster, "Master Peer", "One peer to rule them all", "", true, false, DisplayLevel.Beginner, QuickWatchFormat.Text, null)]
    148         public IP2PControl P2PControlMaster
     146        private IP2PControl p2pSlave;
     147        [PropertyInfo(Direction.ControlSlave, "Master Peer", "One peer to rule them all", "", true, false, DisplayLevel.Beginner, QuickWatchFormat.Text, null)]
     148        public IP2PControl P2PControlSlave
    149149        {
    150150            get
    151151            {
    152                 if (this.p2pMaster == null)
     152                if (this.p2pSlave == null)
    153153                    // to commit the settings of the plugin to the IControl
    154                     this.p2pMaster = new P2PPeerMaster(p2pBase);
    155                 return this.p2pMaster;
     154                    this.p2pSlave = new P2PPeerMaster(p2pBase);
     155                return this.p2pSlave;
    156156            }
    157157            set
    158158            {
    159                 if (this.p2pMaster != null)
    160                     this.p2pMaster.OnStatusChanged -= p2pMaster_OnStatusChanged;
     159                if (this.p2pSlave != null)
     160                    this.p2pSlave.OnStatusChanged -= p2pSlave_OnStatusChanged;
    161161                //{
    162162                //    //Only when using asynchronous p2p-Start-method, remove event handler for OnPeerJoinedCompletely
    163                 //    this.p2pMaster.onPeerJoinedCompletely -= OnPeerJoinedCompletely;
     163                //    this.p2pSlave.OnPeerJoinedCompletely -= OnPeerJoinedCompletely;
    164164                //}
    165                 if (this.p2pMaster != value)
     165                if (this.p2pSlave != value)
    166166                {
    167                     this.p2pMaster.OnStatusChanged +=new IControlStatusChangedEventHandler(p2pMaster_OnStatusChanged);
     167                    this.p2pSlave.OnStatusChanged +=new IControlStatusChangedEventHandler(p2pSlave_OnStatusChanged);
    168168                    //Only when using asynchronous p2p-Start-method, add event handler for OnPeerJoinedCompletely
    169                     //this.p2pMaster.OnPeerJoinedCompletely += new PeerJoinedP2P(OnPeerJoinedCompletely);
    170                     this.p2pMaster = value;
    171                     OnPropertyChanged("P2PControlMaster");
     169                    //this.p2pSlave.OnPeerJoinedCompletely += new PeerJoinedP2P(OnPeerJoinedCompletely);
     170                    this.p2pSlave = value;
     171                    OnPropertyChanged("P2PControlSlave");
    172172                }
    173173            }
    174174        }
    175175
    176         void p2pMaster_OnStatusChanged(IControl sender, bool readyForExecution)
     176        void p2pSlave_OnStatusChanged(IControl sender, bool readyForExecution)
    177177        {
    178178            if (readyForExecution)
     
    206206        public bool DHTremove(string sKey)
    207207        {
    208             return this.p2pBase.SynchRemove(sKey);
     208            // derzeit liegt wohl in peerq@play ein Fehler in der Methode...
     209            // erkennt den Übergabeparameter nicht an und wirft dann "ArgumentNotNullException"...
     210            // Problem an M.Helling und S.Holzapfel von p@p weitergegeben...
     211            // return this.p2pBase.SynchRemove(sKey);
     212            return false;
    209213        }
    210214
  • trunk/CrypPlugins/PeerToPeerBase/PeerToPeerBase.cs

    r783 r794  
    4040 *
    4141 * TODO:
    42  * Testing asynchronous methods incl. EventHandlers
     42 * - dht.Remove-Method makes problems... "ArgumentNotNullException"
     43 *   event though the Parameter is correctly set to a valid value!
     44 *   --> forwarded to the p@p-Team
     45 * - Testing asynchronous methods incl. EventHandlers
    4346 *
    4447 * TO DO in Related Projects:
     
    8386        #endregion
    8487
    85 
    8688        #region Variables
    8789
     
    344346            AutoResetEvent are = new AutoResetEvent(false);
    345347            // this method returns always a GUID to distinguish between asynchronous actions
     348
     349            // ROAD WORKS: This function throws an error (ArgumentNotNullException).
     350            //             I think that's an error in the p@p-environment --> forwarded to the p@p-Team
    346351            Guid g = this.dht.Remove(OnSynchRemoveCompleted, sKey);
    347352
  • trunk/CrypPlugins/PeerToPeerBase/PeerToPeerBase.csproj

    r789 r794  
    113113  </ItemGroup>
    114114  <ItemGroup>
    115     <Resource Include="ct2_p2p_load_medium.png" />
    116   </ItemGroup>
    117   <ItemGroup>
    118     <None Include="C:\Users\Munin\Desktop\P2PMaster.cd">
    119       <Link>P2PMaster.cd</Link>
    120     </None>
     115    <Resource Include="ct2_p2p_system_icon_medium.png" />
     116    <Resource Include="ct2_p2p_system_icon_small.png" />
     117    <Resource Include="ct2_p2p_system_icon_tall.png" />
    121118  </ItemGroup>
    122119  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Note: See TracChangeset for help on using the changeset viewer.