public NodeConnectionParameters()
 {
     ReuseBuffer = true;
     TemplateBehaviors.Add(new PingPongBehavior());
     Version             = ProtocolVersion.PROTOCOL_VERSION;
     IsRelay             = true;
     Services            = NodeServices.Nothing;
     ConnectCancellation = default(CancellationToken);
     ReceiveBufferSize   = 1000 * 5000;
     SendBufferSize      = 1000 * 1000;
     UserAgent           = VersionPayload.GetNBitcoinUserAgent();
 }
示例#2
0
 public NodeConnectionParameters()
 {
     TemplateBehaviors.Add(new PingPongBehavior());
     Version             = null;
     IsRelay             = true;
     Services            = NodeServices.Nothing;
     ConnectCancellation = default(CancellationToken);
     // Use max supported by MAC OSX Yosemite/Mavericks/Sierra (https://fasterdata.es.net/host-tuning/osx/)
     this.SocketSettings.ReceiveBufferSize = 1048576;
     this.SocketSettings.SendBufferSize    = 1048576;
     ////////////////////////
     UserAgent = VersionPayload.GetNBitcoinUserAgent();
     PreferredTransactionOptions = TransactionOptions.All;
 }
示例#3
0
 public NodeConnectionParameters(NodeConnectionParameters other)
 {
     Version             = other.Version;
     IsRelay             = other.IsRelay;
     Services            = other.Services;
     ReceiveBufferSize   = other.ReceiveBufferSize;
     SendBufferSize      = other.SendBufferSize;
     ConnectCancellation = other.ConnectCancellation;
     UserAgent           = other.UserAgent;
     AddressFrom         = other.AddressFrom;
     Nonce     = other.Nonce;
     Advertize = other.Advertize;
     PreferredTransactionOptions = other.PreferredTransactionOptions;
     foreach (var behavior in other.TemplateBehaviors)
     {
         TemplateBehaviors.Add(behavior.Clone());
     }
 }
示例#4
0
 public NodeConnectionParameters(NodeConnectionParameters other)
 {
     Version             = other.Version;
     IsRelay             = other.IsRelay;
     Services            = other.Services;
     ConnectCancellation = other.ConnectCancellation;
     UserAgent           = other.UserAgent;
     AddressFrom         = other.AddressFrom;
     Nonce     = other.Nonce;
     Advertize = other.Advertize;
     PreferredTransactionOptions = other.PreferredTransactionOptions;
     EndpointConnector           = other.EndpointConnector.Clone();
     SocketSettings = other.SocketSettings.Clone();
     foreach (var behavior in other.TemplateBehaviors)
     {
         TemplateBehaviors.Add(behavior.Clone());
     }
 }
        public NodeConnectionParameters(NodeConnectionParameters other)
        {
            Version             = other.Version;
            IsRelay             = other.IsRelay;
            Services            = other.Services;
            ReceiveBufferSize   = other.ReceiveBufferSize;
            SendBufferSize      = other.SendBufferSize;
            ConnectCancellation = other.ConnectCancellation;
            UserAgent           = other.UserAgent;
            AddressFrom         = other.AddressFrom;
            IsTrusted           = other.IsTrusted;
            Nonce       = other.Nonce;
            Advertize   = other.Advertize;
            ReuseBuffer = other.ReuseBuffer;

            foreach (var behavior in other.TemplateBehaviors)
            {
                TemplateBehaviors.Add((NodeBehavior)((ICloneable)behavior).Clone());
            }
        }