Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / TcpConnectionPool.cs / 1 / TcpConnectionPool.cs
//---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------------------- namespace System.ServiceModel.Channels { using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.Net; using System.Net.Sockets; using System.Globalization; using System.ServiceModel.Diagnostics; class TcpConnectionPoolRegistry : ConnectionPoolRegistry { public TcpConnectionPoolRegistry() : base() { } protected override ConnectionPool CreatePool(IConnectionOrientedTransportChannelFactorySettings settings) { ITcpChannelFactorySettings tcpSettings = (ITcpChannelFactorySettings)settings; return new TcpConnectionPool(tcpSettings); } class TcpConnectionPool : ConnectionPool { public TcpConnectionPool(ITcpChannelFactorySettings settings) : base(settings, settings.LeaseTimeout) { } protected override string GetPoolKey(EndpointAddress address, Uri via) { int port = via.Port; if (port == -1) { port = TcpUri.DefaultPort; } string normalizedHost = via.DnsSafeHost.ToUpperInvariant(); return string.Format(CultureInfo.InvariantCulture, @"[{0}, {1}]", normalizedHost, port); } public override bool IsCompatible(IConnectionOrientedTransportChannelFactorySettings settings) { ITcpChannelFactorySettings tcpSettings = (ITcpChannelFactorySettings)settings; return ( (this.LeaseTimeout == tcpSettings.LeaseTimeout) && base.IsCompatible(settings) ); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AssemblyCollection.cs
- SamlAuthenticationClaimResource.cs
- CharacterHit.cs
- StylusPointPropertyInfoDefaults.cs
- WebServiceData.cs
- DependencyPropertyHelper.cs
- CultureInfo.cs
- ChoiceConverter.cs
- ExpressionEvaluator.cs
- TextPattern.cs
- PropertyTab.cs
- ControlAdapter.cs
- AccessibleObject.cs
- XmlValidatingReader.cs
- PropertyChangingEventArgs.cs
- CryptoKeySecurity.cs
- TypeDefinition.cs
- DateTimeOffset.cs
- UnaryQueryOperator.cs
- IPAddressCollection.cs
- FactoryGenerator.cs
- TextTreeTextBlock.cs
- BitStack.cs
- MultipartContentParser.cs
- GridViewDeletedEventArgs.cs
- XmlNamedNodeMap.cs
- PartialCachingAttribute.cs
- CodeDOMUtility.cs
- EntityDataReader.cs
- KnownIds.cs
- ContentFilePart.cs
- WorkflowServiceNamespace.cs
- XPathDocumentIterator.cs
- RuleDefinitions.cs
- DeferredTextReference.cs
- MsmqTransportElement.cs
- DataBindingExpressionBuilder.cs
- TaiwanCalendar.cs
- AuthorizationRule.cs
- IPGlobalProperties.cs
- XmlNodeChangedEventArgs.cs
- BindToObject.cs
- ClientConfigurationSystem.cs
- Trigger.cs
- DetailsViewAutoFormat.cs
- WebControlToolBoxItem.cs
- SyncOperationState.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- VirtualizingStackPanel.cs
- RegexWorker.cs
- SqlConnectionStringBuilder.cs
- SqlStatistics.cs
- SqlNotificationRequest.cs
- DesignerUtils.cs
- DetailsViewRowCollection.cs
- ADMembershipProvider.cs
- DataControlCommands.cs
- PointHitTestParameters.cs
- SessionConnectionReader.cs
- DynamicValueConverter.cs
- ProgressBarHighlightConverter.cs
- NestedContainer.cs
- TemplateBindingExtension.cs
- DesignerOptionService.cs
- SecureConversationServiceElement.cs
- MSAAEventDispatcher.cs
- HostSecurityManager.cs
- TableCell.cs
- AdjustableArrowCap.cs
- CultureNotFoundException.cs
- ConnectionManagementElementCollection.cs
- Events.cs
- Graphics.cs
- BuilderPropertyEntry.cs
- HttpVersion.cs
- XmlAttributeCollection.cs
- XPathDocumentNavigator.cs
- CollectionViewGroup.cs
- PowerModeChangedEventArgs.cs
- TextContainerChangedEventArgs.cs
- SqlMultiplexer.cs
- RIPEMD160.cs
- _SpnDictionary.cs
- StylusPoint.cs
- ServicePointManagerElement.cs
- PropertyInformationCollection.cs
- NullableDecimalAverageAggregationOperator.cs
- ProgressBar.cs
- ZipIOExtraFieldZip64Element.cs
- TokenBasedSetEnumerator.cs
- ImageConverter.cs
- webbrowsersite.cs
- ListView.cs
- CodeVariableDeclarationStatement.cs
- Invariant.cs
- UpDownEvent.cs
- TypeSource.cs
- GridViewSortEventArgs.cs
- InteropBitmapSource.cs
- SoapTypeAttribute.cs