Ignore:
Timestamp:
Dec 12, 2009, 2:07:52 PM (12 years ago)
Author:
arnold
Message:

executable, but non-optimized P2PManager/Worker System

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/PeerToPeerPublisher/P2PPublisherBase.cs

    r971 r980  
    148148            {
    149149
    150                 GuiLogging("Begin removing the information from the DHT", NotificationLevel.Info);
     150                GuiLogging("Begin removing the information from the DHT", NotificationLevel.Debug);
    151151
    152152                bool removeTopic = this.p2pControl.DHTremove(this.topic);
     
    160160                    removeInfo = "Settings";
    161161                if (removeInfo != String.Empty)
    162                     GuiLogging(removeInfo + " successfully removed from DHT.", NotificationLevel.Info);
     162                    GuiLogging(removeInfo + " successfully removed from DHT.", NotificationLevel.Debug);
    163163                else
    164                     GuiLogging("Neither Topic nor settings were removed from DHT.", NotificationLevel.Info);
    165             }
    166 
    167             GuiLogging("Stopping all timers.", NotificationLevel.Info);
     164                    GuiLogging("Neither Topic nor settings were removed from DHT.", NotificationLevel.Debug);
     165            }
     166
     167            GuiLogging("Stopping all timers.", NotificationLevel.Debug);
    168168
    169169            if (this.timerWaitingForAliveMsg != null)
     
    203203                    case PubSubMessageType.Unregister:
    204204                        if (this.peerManagement.Remove(sourceAddr))
    205                             GuiLogging("REMOVED subscriber " + sourceAddr.stringId + " because it had sent an unregister message", NotificationLevel.Info);
     205                            GuiLogging("REMOVED peer " + sourceAddr.stringId + " because it had sent an unregister message", NotificationLevel.Info);
    206206                        else
    207207                            GuiLogging("ALREADY REMOVED or had not registered anytime. ID " + sourceAddr.stringId, NotificationLevel.Info);
     
    211211                        if (this.peerManagement.Update(sourceAddr))
    212212                        {
    213                             GuiLogging("RECEIVED: " + msgType.ToString() + " Message from " + sourceAddr.stringId, NotificationLevel.Info);
     213                            GuiLogging("RECEIVED: " + msgType.ToString() + " Message from " + sourceAddr.stringId, NotificationLevel.Debug);
    214214                        }
    215215                        else
     
    220220                    case PubSubMessageType.Ping:
    221221                        this.p2pControl.SendToPeer(PubSubMessageType.Pong, sourceAddr);
    222                         GuiLogging("REPLIED to a ping message from subscriber " + sourceAddr.stringId, NotificationLevel.Info);
     222                        GuiLogging("REPLIED to a ping message from peer " + sourceAddr.stringId, NotificationLevel.Debug);
    223223                        break;
    224224                    case PubSubMessageType.Solution:
    225225                        // Send solution msg to all subscriber peers and delete subList
    226226                        Stop(msgType);
     227                        break;
     228                    case PubSubMessageType.Stop: //ignore this case. No subscriber can't command the Publisher to stop!
    227229                        break;
    228230                    default:
     
    236238            else
    237239            {
    238                 GuiLogging("RECEIVED message from non subscribed peer: " + sData.Trim() + ", ID: " + sourceAddr.stringId, NotificationLevel.Warning);
     240                GuiLogging("RECEIVED message from non subscribed peer: " + sData.Trim() + ", ID: " + sourceAddr.stringId, NotificationLevel.Debug);
    239241            }
    240242        }
     
    269271            {
    270272                this.p2pControl.SendToPeer(PubSubMessageType.Ping, outdatedSubscriber);
    271                 GuiLogging("PING outdated peer " + outdatedSubscriber, NotificationLevel.Info);
     273                GuiLogging("PING outdated peer " + outdatedSubscriber, NotificationLevel.Debug);
    272274            }
    273275        }
     
    275277        private void peerManagement_OnSubscriberRemoved(PeerId peerId)
    276278        {
    277             GuiLogging("REMOVED subscriber " + peerId.stringId, NotificationLevel.Info);
     279            GuiLogging("REMOVED peer " + peerId.stringId, NotificationLevel.Info);
    278280        }
    279281
Note: See TracChangeset for help on using the changeset viewer.