Changeset 928


Ignore:
Timestamp:
Dec 1, 2009, 12:40:55 AM (12 years ago)
Author:
arnold
Message:

P2PManager Project and modifications/updates for P2PPublisherBase and PeerToPeerBase

Location:
trunk
Files:
13 added
2 deleted
45 edited

Legend:

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

    r872 r928  
    226226            {
    227227                this.dht.BeginStop(null);
    228                 this.overlay.BeginStop(null);
    229                 this.linkmanager.BeginStop(null);
    230                 this.bootstrapper.Dispose();
     228                //don't stop anything else, because BOOM
     229
    231230                //wait till systemLeft Event is invoked
    232231                this.systemLeft.WaitOne();
  • trunk/CrypPlugins/PeerToPeerPublisher/P2PPublisherBase.cs

    r872 r928  
    1818    {
    1919        public delegate void GuiMessage(string sData, NotificationLevel notificationLevel);
    20         public event GuiMessage OnGuiMessage;
     20        public virtual event GuiMessage OnGuiMessage;
    2121
    2222        #region Variables
    2323
    24         private IP2PControl p2pControl;
     24        protected IP2PControl p2pControl;
     25        protected SubscriberManagement peerManagement;
    2526        private string topic = String.Empty;
    26         private string sDHTSettingsPostfix = "Settings";
    27         private SubscriberManagement subManagement;
     27        private string sDHTSettingsPostfix = "Settings";       
    2828        private Timer timerWaitingForAliveMsg;
    2929        private PeerId ownPeerId;
     
    4848        }
    4949
     50        #region public methods (Start, Publish, Stop)
     51
     52        protected virtual void AssignManagement(long aliveMessageInterval)
     53        {
     54            this.peerManagement = new SubscriberManagement(aliveMessageInterval);
     55            this.peerManagement.OnSubscriberRemoved += new SubscriberManagement.SubscriberRemoved(peerManagement_OnSubscriberRemoved);
     56        }
     57
     58        /// <summary>
     59        /// Starts the publisher and checks whether there is already a publisher for this topic (than returns false)
     60        /// </summary>
     61        /// <param name="sTopic">Topic, at which the subscribers can register themselves</param>
     62        /// <param name="aliveMessageInterval">Declare interval (in sec) in which every subscriber has to send an alive message to the publisher</param>
     63        /// <returns>true, if writing all necessary information was written in DHT, otherwise false</returns>
    5064        public bool Start(string sTopic, long aliveMessageInterval)
    5165        {
     
    5367            this.topic = sTopic;
    5468            this.aliveMessageInterval = aliveMessageInterval * 1000;
    55             this.subManagement = new SubscriberManagement(aliveMessageInterval);
    56             this.subManagement.OnSubscriberRemoved += new SubscriberManagement.SubscriberRemoved(subManagement_OnSubscriberRemoved);
     69            AssignManagement(this.aliveMessageInterval);
    5770
    5871            // publish own PeerID to the DHT Entry with the key "TaskName", so every subscriber
     
    7184                if (byRead != myPeerId.byteId)
    7285                {
    73                     OnGuiMessage("Can't store Publisher in the DHT because the Entry was already occupied.", NotificationLevel.Error);
     86                    GuiLogging("Can't store Publisher in the DHT because the Entry was already occupied.", NotificationLevel.Error);
    7487                    return false;
    7588                }
     
    8396            if (!bolTopicStored || !bolSettingsStored)
    8497            {
    85                 OnGuiMessage("Storing Publishers ID or Publishers Settings wasn't possible.", NotificationLevel.Error);
     98                GuiLogging("Storing Publishers ID or Publishers Settings wasn't possible.", NotificationLevel.Error);
    8699                return false;
    87100            }
    88101
    89             OnGuiMessage("Peer ID '" + myPeerId.stringId + "' is published to DHT -Entry-Key '" + this.topic + "'", NotificationLevel.Info);
     102            GuiLogging("Peer ID '" + myPeerId.stringId + "' is published to DHT -Entry-Key '" + this.topic + "'", NotificationLevel.Info);
    90103            this.Started = true;
    91104
     
    93106        }
    94107
    95         private void MessageReceived(PeerId sourceAddr, string sData)
    96         {
    97             PubSubMessageType msgType = this.p2pControl.GetMsgType(sData);
    98 
    99             if (msgType != PubSubMessageType.NULL)
    100             {
    101                 switch (msgType)
    102                 {
    103                     case PubSubMessageType.Register:
    104                         if (this.subManagement.Add(sourceAddr))
    105                         {
    106                             OnGuiMessage("REGISTERED: Peer with ID " + sourceAddr.stringId, NotificationLevel.Info);
    107                             this.p2pControl.SendToPeer(PubSubMessageType.RegisteringAccepted, sourceAddr);
    108                         }
    109                         else
    110                         {
    111                             OnGuiMessage("ALREADY REGISTERED peer with ID " + sourceAddr.stringId, NotificationLevel.Info);
    112                         }
    113                         break;
    114                     case PubSubMessageType.Unregister:
    115                         if (this.subManagement.Remove(sourceAddr))
    116                             OnGuiMessage("REMOVED subscriber " + sourceAddr.stringId + " because it had sent an unregister message", NotificationLevel.Info);
    117                         else
    118                             OnGuiMessage("ALREADY REMOVED or had not registered anytime. ID " + sourceAddr.stringId, NotificationLevel.Info);
    119                         break;
    120                     case PubSubMessageType.Alive:
    121                     case PubSubMessageType.Pong:
    122                         if (this.subManagement.Update(sourceAddr))
    123                         {
    124                             OnGuiMessage("RECEIVED: " + msgType.ToString() + " Message from " + sourceAddr.stringId, NotificationLevel.Info);
    125                         }
    126                         else
    127                         {
    128                             OnGuiMessage("UPDATE FAILED for " + sourceAddr.stringId + " because it hasn't registered first. " + msgType.ToString(), NotificationLevel.Info);
    129                         }
    130                         break;
    131                     case PubSubMessageType.Ping:
    132                         this.p2pControl.SendToPeer(PubSubMessageType.Pong, sourceAddr);
    133                         OnGuiMessage("REPLIED to a ping message from subscriber " + sourceAddr.stringId, NotificationLevel.Info);
    134                         break;
    135                     case PubSubMessageType.Solution:
    136                         // Send solution msg to all subscriber peers and delete subList
    137                         Stop(msgType);
    138                         break;
    139                     default:
    140                         throw (new NotImplementedException());
    141                 } // end switch
    142                 if (timerWaitingForAliveMsg == null)
    143                     timerWaitingForAliveMsg = new Timer(OnWaitingForAliveMsg, null, this.aliveMessageInterval * 1000,
    144                         this.aliveMessageInterval * 1000);
    145             }
    146             // Received Data aren't PubSubMessageTypes or rather no action-relevant messages
    147             else
    148             {
    149                 OnGuiMessage("RECEIVED message from non subscribed peer: " + sData.Trim() + ", ID: " + sourceAddr.stringId, NotificationLevel.Warning);
    150             }
    151         }
    152 
    153         public void Publish(string sText)
    154         {
    155             List<PeerId> lstSubscribers = this.subManagement.GetAllSubscribers();
    156 
    157             PubSubMessageType msgType = this.p2pControl.GetMsgType(sText);
    158             if (msgType == PubSubMessageType.NULL)
    159             {
    160                 foreach (PeerId subscriber in lstSubscribers)
    161                 {
    162                     this.p2pControl.SendToPeer(sText, subscriber);
    163                 }
    164             }
    165             else
    166             {
    167                 foreach (PeerId subscriber in lstSubscribers)
    168                 {
    169                     this.p2pControl.SendToPeer(msgType, subscriber);
    170                 }
    171             }
    172         }
    173 
    174         /// <summary>
    175         /// if peers are outdated (alive message doesn't arrive in the given interval)
    176         /// ping them to give them a second chance
    177         /// </summary>
    178         /// <param name="state"></param>
    179         private void OnWaitingForAliveMsg(object state)
    180         {
    181             List<PeerId> lstOutdatedSubscribers = this.subManagement.CheckVitality();
    182             foreach (PeerId outdatedSubscriber in lstOutdatedSubscribers)
    183             {
    184                 this.p2pControl.SendToPeer(PubSubMessageType.Ping, outdatedSubscriber);
    185                 OnGuiMessage("PING outdated peer " + outdatedSubscriber, NotificationLevel.Info);
    186             }
    187         }
    188 
    189         private void subManagement_OnSubscriberRemoved(PeerId peerId)
    190         {
    191             OnGuiMessage("REMOVED subscriber " + peerId.stringId, NotificationLevel.Info);
    192         }
    193 
    194         public void Stop(PubSubMessageType msgType)
    195         {
    196 
    197             OnGuiMessage("Send unregister message to all subscribers", NotificationLevel.Info);
    198 
     108        /// <summary>
     109        /// Publish text to ALL active subscribers (subscribers of the second chance list included)
     110        /// </summary>
     111        /// <param name="sText"></param>
     112        /// <returns>Amount of Subscribers, to which the message was sent</returns>
     113        public virtual int Publish(string sText)
     114        {
     115            int i = 0;
     116            List<PeerId> lstSubscribers = this.peerManagement.GetAllSubscribers();
     117
     118            foreach (PeerId subscriber in lstSubscribers)
     119            {
     120                this.p2pControl.SendToPeer(sText, subscriber);
     121                i++;
     122            }
     123            return i;
     124        }
     125
     126        /// <summary>
     127        /// Sends a given message to all subscribers, deletes publishers information from DHT and stops all timers.
     128        /// </summary>
     129        /// <param name="msgType">Choose an according MessageType (for example: Unregister or Stop), so every subscriber can handle
     130        /// the LAST message from the publisher correctly!</param>
     131        public virtual void Stop(PubSubMessageType msgType)
     132        {
    199133            // send unregister message to all subscribers
    200             Publish(((int)msgType).ToString());
     134            int i = SendInternalMsg(msgType);
     135            GuiLogging("Unregister messages were sent to " + i.ToString() + " subscribers!", NotificationLevel.Info);
    201136
    202137            //Still an error in dhtRemove... so at present ignored...
     
    204139            {
    205140
    206                 OnGuiMessage("Begin removing the information from the DHT", NotificationLevel.Info);
     141                GuiLogging("Begin removing the information from the DHT", NotificationLevel.Info);
    207142
    208143                bool removeTopic = this.p2pControl.DHTremove(this.topic);
     
    215150                else if (removeSettings)
    216151                    removeInfo = "Settings";
    217                 if(removeInfo != String.Empty)
    218                     OnGuiMessage(removeInfo + " successfully removed from DHT.", NotificationLevel.Info);
     152                if (removeInfo != String.Empty)
     153                    GuiLogging(removeInfo + " successfully removed from DHT.", NotificationLevel.Info);
    219154                else
    220                     OnGuiMessage("Neither Topic nor settings were removed from DHT.", NotificationLevel.Info);
    221             }
    222 
    223             OnGuiMessage("Stopping all timers.",NotificationLevel.Info);
     155                    GuiLogging("Neither Topic nor settings were removed from DHT.", NotificationLevel.Info);
     156            }
     157
     158            GuiLogging("Stopping all timers.", NotificationLevel.Info);
    224159
    225160            if (this.timerWaitingForAliveMsg != null)
     
    229164            }
    230165
    231             OnGuiMessage("Publisher completely stopped!", NotificationLevel.Info);
     166            GuiLogging("Publisher completely stopped!", NotificationLevel.Info);
    232167
    233168            this.Started = false;
    234169        }
     170
     171        #endregion
     172
     173        #region private Methods (MessageReceived, SendInternalMsg, OnWaitingForAliveMsg, peerManagement_OnSubscriberRemoved)
     174
     175        protected virtual void MessageReceived(PeerId sourceAddr, string sData)
     176        {
     177            PubSubMessageType msgType = this.p2pControl.GetMsgType(sData);
     178
     179            if (msgType != PubSubMessageType.NULL)
     180            {
     181                switch (msgType)
     182                {
     183                    case PubSubMessageType.Register:
     184                        if (this.peerManagement.Add(sourceAddr))
     185                        {
     186                            GuiLogging("REGISTERED: Peer with ID " + sourceAddr.stringId, NotificationLevel.Info);
     187                            this.p2pControl.SendToPeer(PubSubMessageType.RegisteringAccepted, sourceAddr);
     188                        }
     189                        else
     190                        {
     191                            GuiLogging("ALREADY REGISTERED peer with ID " + sourceAddr.stringId, NotificationLevel.Info);
     192                        }
     193                        break;
     194                    case PubSubMessageType.Unregister:
     195                        if (this.peerManagement.Remove(sourceAddr))
     196                            GuiLogging("REMOVED subscriber " + sourceAddr.stringId + " because it had sent an unregister message", NotificationLevel.Info);
     197                        else
     198                            GuiLogging("ALREADY REMOVED or had not registered anytime. ID " + sourceAddr.stringId, NotificationLevel.Info);
     199                        break;
     200                    case PubSubMessageType.Alive:
     201                    case PubSubMessageType.Pong:
     202                        if (this.peerManagement.Update(sourceAddr))
     203                        {
     204                            GuiLogging("RECEIVED: " + msgType.ToString() + " Message from " + sourceAddr.stringId, NotificationLevel.Info);
     205                        }
     206                        else
     207                        {
     208                            GuiLogging("UPDATE FAILED for " + sourceAddr.stringId + " because it hasn't registered first. " + msgType.ToString(), NotificationLevel.Info);
     209                        }
     210                        break;
     211                    case PubSubMessageType.Ping:
     212                        this.p2pControl.SendToPeer(PubSubMessageType.Pong, sourceAddr);
     213                        GuiLogging("REPLIED to a ping message from subscriber " + sourceAddr.stringId, NotificationLevel.Info);
     214                        break;
     215                    case PubSubMessageType.Solution:
     216                        // Send solution msg to all subscriber peers and delete subList
     217                        Stop(msgType);
     218                        break;
     219                    default:
     220                        throw (new NotImplementedException());
     221                } // end switch
     222                if (timerWaitingForAliveMsg == null)
     223                    timerWaitingForAliveMsg = new Timer(OnWaitingForAliveMsg, null, this.aliveMessageInterval * 1000,
     224                        this.aliveMessageInterval * 1000);
     225            }
     226            // Received Data aren't PubSubMessageTypes or rather no action-relevant messages
     227            else
     228            {
     229                GuiLogging("RECEIVED message from non subscribed peer: " + sData.Trim() + ", ID: " + sourceAddr.stringId, NotificationLevel.Warning);
     230            }
     231        }
     232
     233        /// <summary>
     234        /// This functions can only send infrastructure-supporting messages to all subscribers
     235        /// </summary>
     236        /// <param name="msgType"></param>
     237        /// <returns>Amount of Subscribers, to which a message was sent</returns>
     238        private int SendInternalMsg(PubSubMessageType msgType)
     239        {
     240            int i = 0;
     241            List<PeerId> lstSubscribers = this.peerManagement.GetAllSubscribers();
     242            foreach (PeerId subscriber in lstSubscribers)   
     243            {
     244                this.p2pControl.SendToPeer(msgType, subscriber);
     245                i++;
     246            }
     247            return i;
     248        }
     249
     250        /// <summary>
     251        /// if peers are outdated (alive message doesn't arrive in the given interval)
     252        /// ping them to give them a second chance
     253        /// </summary>
     254        /// <param name="state"></param>
     255        private void OnWaitingForAliveMsg(object state)
     256        {
     257            // get second chance list from SubscribersManagement (Second chance list = The timespans of this subscribers are expired)
     258            List<PeerId> lstOutdatedSubscribers = this.peerManagement.CheckVitality();
     259            foreach (PeerId outdatedSubscriber in lstOutdatedSubscribers)
     260            {
     261                this.p2pControl.SendToPeer(PubSubMessageType.Ping, outdatedSubscriber);
     262                GuiLogging("PING outdated peer " + outdatedSubscriber, NotificationLevel.Info);
     263            }
     264        }
     265
     266        private void peerManagement_OnSubscriberRemoved(PeerId peerId)
     267        {
     268            GuiLogging("REMOVED subscriber " + peerId.stringId, NotificationLevel.Info);
     269        }
     270
     271        protected void GuiLogging(string sText, NotificationLevel notLev)
     272        {
     273            if(OnGuiMessage != null)
     274                OnGuiMessage(sText, notLev);
     275        }
     276
     277        #endregion
    235278    }
    236279}
  • trunk/CrypPlugins/PeerToPeerPublisher/SubscribersManagement.cs

    r872 r928  
    55using System.Collections;
    66
    7 /*
    8  * TODO:
    9  * - Everything but activeSubList works fine.
    10  *   --> Removing object doesn't work because two DIFFERENT OBJECTS with the SAME content!
     7/*
     8 * Everything works fine.
     9 * @CheckVitality: Don't know what is better. Run through two loops and save copying dict or copying dict and save a second loop...
    1110 */
    1211
     
    2827    {
    2928        public delegate void SubscriberRemoved(PeerId peerId);
     29        /// <summary>
     30        /// this event is thrown when a subscriber/worker has been removed from managing list
     31        /// </summary>
    3032        public event SubscriberRemoved OnSubscriberRemoved;
    3133
     
    3840
    3941        /*TESTING*/
    40         private Dictionary<string, PeerId> activeSubsList;
    41         //private List<PeerId> activeSubsList;
     42        protected Dictionary<string, PeerId> activeSubsList;
    4243
    4344
     
    6566        {
    6667            this.activeSubsList = new Dictionary<string, PeerId>();
    67             //this.activeSubsList = new List<PeerId>();
    6868
    6969            this.dateTimeNow = new DateTime();
     
    7878        /// <param name="subscriberId">ID of the Subscriber</param>
    7979        /// <returns>true if subscriber wasn't in List and is added, otherwise false</returns>
    80         public bool Add(PeerId subscriberId)
     80        public virtual bool Add(PeerId subscriberId)
    8181        {
    8282            if (!this.checkList.ContainsKey(subscriberId.stringId))
    8383            {
    8484                this.dateTimeNow = DateTime.Now;
    85                 this.checkList.Add(subscriberId.stringId, new PeerValue(subscriberId, this.dateTimeNow));
    86                 //TESTING
    87                 this.activeSubsList.Add(subscriberId.stringId, subscriberId);
    88                 //this.activeSubsList.Add(subscriberId);
     85                // locking checkList instead of activeSubsList, because all other functions work on checkList, not on activeSubsList
     86                lock (this.checkList)
     87                {
     88                    this.checkList.Add(subscriberId.stringId, new PeerValue(subscriberId, this.dateTimeNow));
     89                    this.activeSubsList.Add(subscriberId.stringId, subscriberId);
     90                }
    8991                return true;
    9092            }
     
    118120        /// <param name="subscriberId"></param>
    119121        /// <returns></returns>
    120         public bool Remove(PeerId subscriberId)
    121         {
    122             if (this.checkList.ContainsKey(subscriberId.stringId))
    123             {
    124                 this.checkList.Remove(subscriberId.stringId);
    125                 // don't know if the parameter-element is the SAME object as the stored object...
    126                 //this.activeSubsList.Remove(subscriberId);
    127                 this.activeSubsList.Remove(subscriberId.stringId);
    128                 return true;
    129             }
    130             return false;
    131         }
     122        public virtual bool Remove(PeerId subscriberId)
     123        {
     124            return RemoveSubscriberEverywhere(subscriberId);
     125        }
     126
     127        protected virtual bool RemoveSubscriberEverywhere(PeerId subId)
     128        {
     129            bool result = false;
     130            lock(this.checkList)
     131            {
     132                if(this.secondChanceList.ContainsKey(subId.stringId))
     133                    this.secondChanceList.Remove(subId.stringId);
     134                if (this.checkList.ContainsKey(subId.stringId))
     135                {
     136                    this.checkList.Remove(subId.stringId);
     137                    result = true;
     138                }
     139                if (this.activeSubsList.ContainsKey(subId.stringId))
     140                {
     141                    this.activeSubsList.Remove(subId.stringId);
     142                    result = true;
     143                }
     144
     145                if (result && OnSubscriberRemoved != null)
     146                    OnSubscriberRemoved(subId);
     147            }
     148            return result;
     149        }
     150
     151        /* see alternative method */
    132152
    133153        /// <summary>
     
    142162            List<PeerId> removeSubscribersFromDict = new List<PeerId>();
    143163
    144             foreach (KeyValuePair<string, PeerValue> entry in this.checkList)
    145             {
    146                 DateTime valueWithExpirationTime = entry.Value.dateTime.AddMilliseconds(ExpirationTime);
    147 
    148                 // if time is expired AND the ID is already in the secondChanceList --> Add to remove list
    149                 if (this.dateTimeNow > valueWithExpirationTime && secondChanceList.ContainsKey(entry.Key))
    150                 {
    151                     removeSubscribersFromDict.Add(entry.Value.peerId);
    152                 }
    153                 else if (this.dateTimeNow > valueWithExpirationTime) //otherwise give a second chance
    154                 {
    155                     this.secondChanceList.Add(entry.Key, entry.Value.peerId);
    156                 }
    157             }
     164            lock (this.checkList)
     165            {
     166                foreach (KeyValuePair<string, PeerValue> entry in this.checkList)
     167                {
     168                    DateTime valueWithExpirationTime = entry.Value.dateTime.AddMilliseconds(ExpirationTime);
     169
     170                    // if time is expired AND the ID is already in the secondChanceList --> Add to remove list
     171                    if (this.dateTimeNow > valueWithExpirationTime && secondChanceList.ContainsKey(entry.Key))
     172                    {
     173                        removeSubscribersFromDict.Add(entry.Value.peerId);
     174                    }
     175                    else if (this.dateTimeNow > valueWithExpirationTime) //otherwise give a second chance
     176                    {
     177                        this.secondChanceList.Add(entry.Key, entry.Value.peerId);
     178                    }
     179                }
     180            } //end lock(this.checkList)
     181
    158182            foreach (PeerId removeSub in removeSubscribersFromDict)
    159183            {
    160                 this.secondChanceList.Remove(removeSub.stringId);
    161                 this.checkList.Remove(removeSub.stringId);
    162 
    163                 // remove entry from activeSubsList, don't know if it works...
    164                 //this.activeSubsList.Remove(removeSub);
    165                 this.activeSubsList.Remove(removeSub.stringId);
    166 
    167                 if (OnSubscriberRemoved != null)
    168                     OnSubscriberRemoved(removeSub);
     184                // functionality swapped for inheritance matters
     185                RemoveSubscriberEverywhere(removeSub);
    169186            }
    170187
     
    172189        }
    173190
     191        /* alternative method, works with a copy of checkList, saves a foreach-loop, but produces load for copying */
     192        /*
     193        /// <summary>
     194        /// Removes all Subscribers which are long-rated outdated (expiration time is considered).
     195        /// The recently outdated subscribers will be added to the returned second chance list.
     196        /// </summary>
     197        /// <returns>all recently outdated subscribers</returns>
     198        public List<PeerId> CheckVitality()
     199        {
     200            this.dateTimeNow = DateTime.Now;
     201
     202            lock (this.checkList)
     203            {
     204                //don't know what is better. Run through two loops and save copying dict or copying dict and save a second loop...
     205                Dictionary<string, PeerValue> checkListCopy = this.checkList;
     206                foreach (KeyValuePair<string, PeerValue> entry in this.checkListCopy)
     207                {
     208                    DateTime valueWithExpirationTime = entry.Value.dateTime.AddMilliseconds(ExpirationTime);
     209
     210                    // if time is expired AND the ID is already in the secondChanceList --> Add to remove list
     211                    if (this.dateTimeNow > valueWithExpirationTime && secondChanceList.ContainsKey(entry.Key))
     212                    {
     213                        this.secondChanceList.Remove(removeSub.stringId);
     214                        // remove entry from ORIGINAL dictionary!
     215                        this.checkList.Remove(removeSub.stringId);
     216                        this.activeSubsList.Remove(removeSub.stringId);
     217
     218                        if (OnSubscriberRemoved != null)
     219                            OnSubscriberRemoved(removeSub);
     220                    }
     221                    else if (this.dateTimeNow > valueWithExpirationTime) //otherwise give a second chance
     222                    {
     223                        this.secondChanceList.Add(entry.Key, entry.Value.peerId);
     224                    }
     225                }
     226            } //end lock(this.checkList)
     227
     228            return this.secondChanceList.Values.ToList<PeerId>();
     229        }
     230        */
     231
    174232        public List<PeerId> GetAllSubscribers()
    175233        {
    176234            return this.activeSubsList.Values.ToList<PeerId>();
    177             //return this.activeSubsList;
    178         }
    179 
    180         public void Dispose()
     235        }
     236
     237        public virtual void Dispose()
    181238        {
    182239            this.checkList.Clear();
  • trunk/CrypPlugins/PeerToPeerSubscriber/P2PSubscriberBase.cs

    r872 r928  
    88
    99/*
     10 * All Subscriber functions work problem-free!
     11 *
    1012 * IDEAS:
    1113 * - Publisher takes subscriber list out of the DHT and registered
     
    175177                    + "' with data: '" + sData + "'", NotificationLevel.Info);
    176178
    177 
    178179                    if (OnTextArrivedFromPublisher != null)
    179180                        OnTextArrivedFromPublisher(sData, sourceAddr);
    180                     //Outputvalue = sData;
    181 
    182 
    183181
    184182                    break;
  • trunk/CrypPlugins/PeerToPeerSubscriber/PeerToPeerSubscriber.csproj

    r872 r928  
    7575    <Resource Include="ct2_p2p_sub_medium.png" />
    7676  </ItemGroup>
     77  <ItemGroup>
     78    <None Include="..\..\..\..\DA workspace\Bilder\SubscriberBase.cd">
     79      <Link>SubscriberBase.cd</Link>
     80    </None>
     81  </ItemGroup>
    7782  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    7883  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Note: See TracChangeset for help on using the changeset viewer.