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/PeerToPeerBase/PeerToPeerBase.cs

    r971 r980  
    287287            // receives Messages and not all active application on the SAME overlay!
    288288            OverlayMessage overlayMsg = new OverlayMessage(MessageReceiverType.P2PBase,
    289                 this.overlay.LocalAddress,destinationAddr, byteData);
     289                this.overlay.LocalAddress, destinationAddr, byteData);
     290
    290291            this.overlay.Send(overlayMsg);
    291292        }
     
    304305        {
    305306            SendToPeer(((int)msgType).ToString(), destinationAddress.byteId);
     307        }
     308
     309        private void overlay_MessageReceived(object sender, OverlayMessageEventArgs e)
     310        {
     311            if (OnP2PMessageReceived != null)
     312            {
     313                PeerId pid = new PeerId(e.Message.Source.ToString(), e.Message.Source.ToByteArray());
     314                OnP2PMessageReceived(pid, e.Message.Data.PopUTF8String());
     315            }
    306316        }
    307317
     
    324334            this.systemLeft.Set();
    325335            Started = false;
    326         }
    327 
    328         private void overlay_MessageReceived(object sender, OverlayMessageEventArgs e)
    329         {
    330             if (OnP2PMessageReceived != null)
    331             {
    332                 PeerId pid = new PeerId(e.Message.Source.ToString(), e.Message.Source.ToByteArray());
    333                 OnP2PMessageReceived(pid, e.Message.Data.PopUTF8String());
    334             }
    335336        }
    336337
Note: See TracChangeset for help on using the changeset viewer.