Changeset 1206


Ignore:
Timestamp:
Feb 26, 2010, 5:56:37 PM (12 years ago)
Author:
Arno Wacker
Message:

P2PBase:

  • Added some P2P settings
  • Minor performance improvement for P2PBase (using only a single scheduler)
File:
1 edited

Legend:

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

    r1200 r1206  
    166166        {
    167167            #region Setting LinkManager, Bootstrapper, Overlay and DHT to the specified types
     168
     169            Scheduler scheduler = new STAScheduler("pap");
     170
    168171            switch (linkManagerType)
    169172            {
     
    171174                    LogToMonitor("Init LinkMgr: Using NAT Traversal stuff");
    172175                    // NAT-Traversal stuff needs a different Snal-Version
    173                     this.linkmanager = new PeersAtPlay.P2PLink.SnalNG.Snal(new STAScheduler("crypt"));
    174 
     176                    this.linkmanager = new PeersAtPlay.P2PLink.SnalNG.Snal(scheduler);
    175177                    ((PeersAtPlay.P2PLink.SnalNG.Snal)this.linkmanager).Settings.ConnectInternal = true;
    176178                    ((PeersAtPlay.P2PLink.SnalNG.Snal)this.linkmanager).Settings.LocalReceivingPort = 0;
    177179                    ((PeersAtPlay.P2PLink.SnalNG.Snal)this.linkmanager).Settings.UseLocalAddressDetection = false;
     180                    ((PeersAtPlay.P2PLink.SnalNG.Snal)this.linkmanager).Settings.AutoReconnect = false;
     181                    ((PeersAtPlay.P2PLink.SnalNG.Snal)this.linkmanager).Settings.NoDelay = false;
     182                    ((PeersAtPlay.P2PLink.SnalNG.Snal)this.linkmanager).Settings.ReuseAddress = false;
     183                    ((PeersAtPlay.P2PLink.SnalNG.Snal)this.linkmanager).Settings.UseNetworkMonitorServer = true;
    178184                    break;
    179185                default:
     
    193199                    PeersAtPlay.P2POverlay.Bootstrapper.IrcBootstrapper.Settings.SymmetricResponseDelay = 6000;
    194200
    195                     this.bootstrapper = new IrcBootstrapper();
     201                    this.bootstrapper = new IrcBootstrapper(scheduler);
    196202                    break;
    197203                default:
     
    202208                case P2POverlayType.FullMeshOverlay:
    203209                    // changing overlay example: this.overlay = new ChordOverlay();
    204                     this.overlay = new FullMeshOverlay();
     210                    this.overlay = new FullMeshOverlay(scheduler);
    205211                    break;
    206212                default:
     
    210216            {
    211217                case P2PDHTType.FullMeshDHT:
    212                     this.dht = new FullMeshDHT();
     218                    this.dht = new FullMeshDHT(scheduler);
    213219                    break;
    214220                default:
Note: See TracChangeset for help on using the changeset viewer.