コード例 #1
0
 public PeerNodeConfig(string meshId, ulong nodeId, PeerResolver resolver, PeerMessagePropagationFilter messagePropagationFilter, System.ServiceModel.Channels.MessageEncoder encoder, Uri listenUri, IPAddress listenIPAddress, int port, long maxReceivedMessageSize, int minNeighbors, int idealNeighbors, int maxNeighbors, int maxReferrals, int connectTimeout, int maintainerInterval, PeerSecurityManager securityManager, XmlDictionaryReaderQuotas readerQuotas, long maxBufferPool, int maxSendQueueSize, int maxReceiveQueueSize)
 {
     this.connectTimeout = connectTimeout;
     this.listenIPAddress = listenIPAddress;
     this.listenUri = listenUri;
     this.maxReceivedMessageSize = maxReceivedMessageSize;
     this.minNeighbors = minNeighbors;
     this.idealNeighbors = idealNeighbors;
     this.maxNeighbors = maxNeighbors;
     this.maxReferrals = maxReferrals;
     this.maxReferralCacheSize = 50;
     this.maxResolveAddresses = 3;
     this.meshId = meshId;
     this.encoder = encoder;
     this.messagePropagationFilter = messagePropagationFilter;
     this.nodeId = nodeId;
     this.port = port;
     this.resolver = resolver;
     this.maintainerInterval = maintainerInterval;
     this.maintainerRetryInterval = new TimeSpan(0x5f5e100L);
     this.maintainerTimeout = new TimeSpan(0x47868c00L);
     this.unregisterTimeout = new TimeSpan(0x47868c00L);
     this.securityManager = securityManager;
     readerQuotas.CopyTo(this.readerQuotas);
     this.maxBufferPoolSize = maxBufferPool;
     this.maxIncomingConcurrentCalls = maxReceiveQueueSize;
     this.maxSendQueueSize = maxSendQueueSize;
 }
コード例 #2
0
ファイル: PeerOutputChannel.cs プロジェクト: nickchal/pash
		public PeerOutputChannel (PeerChannelFactory<IOutputChannel> factory, EndpointAddress address, Uri via, PeerResolver resolver)
			: base (factory, address, via)
		{
			this.factory = factory;
			this.resolver = resolver;

			// It could be opened even with empty list of PeerNodeAddresses.
			// So, do not create PeerNode per PeerNodeAddress, but do it with PeerNodeAddress[].
			node = new PeerNodeImpl (resolver, RemoteAddress, factory.Source.Port);
		}
コード例 #3
0
 public Registration(Uri listenUri, IPeerFactory factory)
 {
     if (factory.Resolver == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(
             new InvalidOperationException(SR.GetString(SR.PeerResolverRequired)));
     }
     if (factory.ListenIPAddress != null)
     {
         listenIPAddress = factory.ListenIPAddress;
     }
     this.listenUri = new UriBuilder(PeerStrings.Scheme, listenUri.Host).Uri;
     this.port = factory.Port;
     this.maxReceivedMessageSize = factory.MaxReceivedMessageSize;
     this.resolver = factory.Resolver;
     this.securityManager = factory.SecurityManager;
     this.readerQuotas = new XmlDictionaryReaderQuotas();
     factory.ReaderQuotas.CopyTo(this.readerQuotas);
     this.maxBufferPoolSize = factory.MaxBufferPoolSize;
 }