コード例 #1
0
        private void Initialize(TcpTransportBindingElement bindingElement)
        {
            var maxOutboundConnectionsPerEndpoint = bindingElement.ConnectionPoolSettings.MaxOutboundConnectionsPerEndpoint;

            if (maxOutboundConnectionsPerEndpoint == ConnectionOrientedTransportDefaults.MaxOutboundConnectionsPerEndpoint)
            {
                _maxPooledConnections = ConnectionOrientedTransportDefaults.GetMaxConnections();
            }
            else
            {
                _maxPooledConnections = maxOutboundConnectionsPerEndpoint;
            }

            _idleTimeout = bindingElement.ConnectionPoolSettings.IdleTimeout;
        }
コード例 #2
0
 protected TcpTransportBindingElement(TcpTransportBindingElement elementToBeCloned) : base(elementToBeCloned)
 {
     _listenBacklog            = elementToBeCloned._listenBacklog;
     ConnectionPoolSettings    = elementToBeCloned.ConnectionPoolSettings.Clone();
     _extendedProtectionPolicy = elementToBeCloned.ExtendedProtectionPolicy;
 }
コード例 #3
0
 public ConnectionReuseHandler(TcpTransportBindingElement bindingElement)
 {
     _bindingElement = bindingElement;
     Initialize(_bindingElement);
     _connectionPoolSemaphore = new SemaphoreSlim(_maxPooledConnections);
 }
コード例 #4
0
 public TcpReplyChannelListener(TcpTransportBindingElement bindingElement, BindingContext context)
     : base(bindingElement, context)
 {
     replyAcceptor = new ConnectionOrientedTransportReplyChannelAcceptor(this);
 }
コード例 #5
0
 protected TcpChannelListener(TcpTransportBindingElement bindingElement, BindingContext context)
     : base(bindingElement, context)
 {
 }
コード例 #6
0
 public TcpDuplexChannelListener(TcpTransportBindingElement bindingElement, BindingContext context)
     : base(bindingElement, context)
 {
     duplexAcceptor = new InputQueueChannelAcceptor <IDuplexSessionChannel>(this);
 }
コード例 #7
0
 protected TcpTransportBindingElement(TcpTransportBindingElement elementToBeCloned) : base(elementToBeCloned)
 {
     listenBacklog            = elementToBeCloned.listenBacklog;
     extendedProtectionPolicy = elementToBeCloned.ExtendedProtectionPolicy;
 }