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
- ProxyWebPartConnectionCollection.cs
- LabelInfo.cs
- FrameworkTextComposition.cs
- ConditionalAttribute.cs
- XamlVector3DCollectionSerializer.cs
- ExpressionWriter.cs
- thaishape.cs
- ConcurrentDictionary.cs
- DbLambda.cs
- WebPartPersonalization.cs
- SortKey.cs
- CompositeCollection.cs
- DllHostInitializer.cs
- RemoteWebConfigurationHostStream.cs
- PersonalizationProviderCollection.cs
- PreservationFileReader.cs
- basemetadatamappingvisitor.cs
- BindingBase.cs
- HtmlHistory.cs
- RuleElement.cs
- AuthenticationModulesSection.cs
- PackagePartCollection.cs
- CombinedGeometry.cs
- XPathNodeInfoAtom.cs
- MSAAWinEventWrap.cs
- DataGridColumnCollection.cs
- ClassicBorderDecorator.cs
- CompilerError.cs
- ThicknessAnimation.cs
- MenuCommand.cs
- XmlDictionaryString.cs
- XmlSchemaSimpleTypeList.cs
- NumericUpDown.cs
- Exceptions.cs
- CompositeDataBoundControl.cs
- GZipStream.cs
- TableItemStyle.cs
- Mutex.cs
- Assert.cs
- XmlSchemaAnnotation.cs
- DocumentGridContextMenu.cs
- OleDbException.cs
- ArrayElementGridEntry.cs
- OleDbFactory.cs
- InputLanguage.cs
- BuilderPropertyEntry.cs
- ZoneMembershipCondition.cs
- EdmScalarPropertyAttribute.cs
- CompositeTypefaceMetrics.cs
- TraceEventCache.cs
- ResolveNameEventArgs.cs
- BitmapEffectInputData.cs
- Psha1DerivedKeyGeneratorHelper.cs
- TakeOrSkipQueryOperator.cs
- CatalogZone.cs
- InputReportEventArgs.cs
- OLEDB_Enum.cs
- UserPreferenceChangedEventArgs.cs
- WebPartMinimizeVerb.cs
- invalidudtexception.cs
- TreeNodeCollectionEditor.cs
- RelationshipConstraintValidator.cs
- PackagingUtilities.cs
- TransportDefaults.cs
- X509ChainPolicy.cs
- IisTraceListener.cs
- DetailsViewInsertEventArgs.cs
- NumberAction.cs
- BoundColumn.cs
- ProxyFragment.cs
- UriSectionReader.cs
- ObfuscateAssemblyAttribute.cs
- WebResponse.cs
- XmlQueryOutput.cs
- FlagsAttribute.cs
- TargetFrameworkUtil.cs
- Deflater.cs
- MSG.cs
- CodeIterationStatement.cs
- BidirectionalDictionary.cs
- WinInet.cs
- RuleSetDialog.Designer.cs
- ToolStripSeparatorRenderEventArgs.cs
- XmlAutoDetectWriter.cs
- CommonDialog.cs
- CommonObjectSecurity.cs
- BooleanSwitch.cs
- Geometry3D.cs
- CqlLexerHelpers.cs
- ScriptingWebServicesSectionGroup.cs
- OleDbRowUpdatingEvent.cs
- Int32CollectionConverter.cs
- VerificationAttribute.cs
- XmlDocumentType.cs
- NonSerializedAttribute.cs
- Vertex.cs
- ClrPerspective.cs
- OdbcReferenceCollection.cs
- ComboBoxRenderer.cs
- ZipIOFileItemStream.cs