Ignore:
Timestamp:
Jan 28, 2010, 4:31:53 PM (12 years ago)
Author:
arnold
Message:

P2P stuff enhanced with peersAtPlay certification, so all certificates, which are necessary for using the p2p system will be checked and - in case of doubt - installed in the background before initializing the p2p system.
Furthermore the SimpleSnalNG was banned from the P2PBase, so you can only initialize the p2p system with the newer SnalNG, which supports certificates.

The lib is required by all developers, so I'm adding it explicitly to the repository.

override-bad-extension: opa.vs.uni-due.de.cer
override-bad-extension: pap.cer
override-bad-extension: pap0001.p12
override-bad-extension: ServerCA.cer
override-bad-extension: Bootstrapper.dll
override-bad-extension: Bootstrapper.pdb
override-bad-extension: CertServices.dll
override-bad-extension: CertServices.pdb
override-bad-extension: FullMeshDHT.dll
override-bad-extension: FullMeshDHT.pdb
override-bad-extension: FullMeshOverlay.dll
override-bad-extension: FullMeshOverlay.pdb
override-bad-extension: Gears4Net.dll
override-bad-extension: Gears4Net.pdb
override-bad-extension: LinkManager.dll
override-bad-extension: LinkManager.pdb
override-bad-extension: NetGearsTCP.dll
override-bad-extension: NetGearsTCP.pdb
override-bad-extension: PeersAtPlayBase.dll
override-bad-extension: PeersAtPlayBase.pdb
override-bad-extension: Stun.dll
override-bad-extension: Stun.pdb
override-bad-extension: Util.dll
override-bad-extension: Util.pdb

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/PeerToPeerSubscriber/P2PSubscriberBase.cs

    r1100 r1115  
    105105        public void Start(string sTopic, long checkPublishersAvailability, long publishersReplyTimespan)
    106106        {
    107             this.p2pControl.OnPayloadMessageReceived += new P2PPayloadMessageReceived(p2pControl_OnPayloadMessageReceived);
    108             this.p2pControl.OnSystemMessageReceived += new P2PSystemMessageReceived(p2pControl_OnSystemMessageReceived);
    109 
    110107            this.sTopic = sTopic;
    111108            this.checkPublishersAvailability = checkPublishersAvailability;
     
    116113        private void Register()
    117114        {
     115            // Unfortunately you have to register this events every time, because this events will be deregistered, when
     116            // Publisher/Manager sends a Unregister/Stop-Message... There isn't any possibility to check,
     117            // whether the Events are already registered (if(dings != null) or anything else).
     118            this.p2pControl.OnPayloadMessageReceived += new P2PPayloadMessageReceived(p2pControl_OnPayloadMessageReceived);
     119            this.p2pControl.OnSystemMessageReceived += new P2PSystemMessageReceived(p2pControl_OnSystemMessageReceived);
     120
    118121            // because CheckPublishersAvailability checks this value, set it for the first time here...
    119122            // if bolStopped = true, the Timer for Checking Publishers liveliness doesn't start
     
    138141            }
    139142            SendMessage(pubId, PubSubMessageType.Register);
    140             if (this.timeoutForPublishersRegAccept == null)
    141                 this.timeoutForPublishersRegAccept = new Timer(OnTimeoutRegisteringAccepted, null, this.publisherReplyTimespan, this.publisherReplyTimespan);
    142143            this.started = true;
    143144        }
     
    232233                        timerRegisteringNotPossible = null;
    233234                    }
     235                    // start waiting interval for RegAccept Message
     236                    if (this.timeoutForPublishersRegAccept == null)
     237                        this.timeoutForPublishersRegAccept = new Timer(OnTimeoutRegisteringAccepted, null, this.publisherReplyTimespan, this.publisherReplyTimespan);
    234238                    break;
    235239                case PubSubMessageType.Alive:
     
    238242                case PubSubMessageType.Unregister:
    239243                case PubSubMessageType.Stop:
    240 
    241244                case PubSubMessageType.Solution:
    242245                    break;
     
    251254            this.p2pControl.SendToPeer(msgType, pubPeerId);
    252255
    253             // don't show every single alive message
    254             if (msgType != PubSubMessageType.Alive)
    255                 GuiLogging(msgType.ToString() + " message sent to Publisher", NotificationLevel.Debug);
     256            GuiLogging(msgType.ToString() + " message sent to Publisher", NotificationLevel.Debug);
    256257        }
    257258
     
    341342        private void OnTimeoutRegisteringAccepted(object state)
    342343        {
    343             GuiLogging("TIMEOUT: Waiting for registering accepted message from publisher!", NotificationLevel.Warning);
     344            GuiLogging("TIMEOUT: Waiting for registering accepted message from publisher!", NotificationLevel.Debug);
    344345            // try to register again
    345346            Register();
Note: See TracChangeset for help on using the changeset viewer.