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
- ExtensibleClassFactory.cs
- MatrixAnimationUsingPath.cs
- IgnoreSectionHandler.cs
- DBConnection.cs
- PerformanceCountersElement.cs
- ColumnTypeConverter.cs
- ProvidePropertyAttribute.cs
- EnumMemberAttribute.cs
- ColorConvertedBitmap.cs
- SvcMapFileLoader.cs
- SpecialNameAttribute.cs
- PropertyRecord.cs
- BuiltInExpr.cs
- HtmlInputPassword.cs
- OleServicesContext.cs
- MediaTimeline.cs
- HttpContext.cs
- XsltQilFactory.cs
- storepermissionattribute.cs
- Signature.cs
- ProfessionalColorTable.cs
- RowUpdatedEventArgs.cs
- HTMLTextWriter.cs
- ScrollViewer.cs
- FixUp.cs
- ErrorHandlerModule.cs
- ToolStripPanelCell.cs
- PageAdapter.cs
- DesignSurfaceEvent.cs
- PerformanceCounterManager.cs
- MultipartContentParser.cs
- Vector3DAnimation.cs
- TextTrailingCharacterEllipsis.cs
- KeyValuePair.cs
- DesignerActionKeyboardBehavior.cs
- ReferentialConstraintRoleElement.cs
- HoistedLocals.cs
- SystemIPv4InterfaceProperties.cs
- PeerApplication.cs
- Label.cs
- TextReader.cs
- SmiMetaData.cs
- Variable.cs
- HashCodeCombiner.cs
- OrthographicCamera.cs
- SessionIDManager.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- DataGridViewLinkColumn.cs
- DesignerWithHeader.cs
- Rfc2898DeriveBytes.cs
- SafeHandle.cs
- Image.cs
- CacheOutputQuery.cs
- contentDescriptor.cs
- HtmlTableRowCollection.cs
- Scripts.cs
- TextEvent.cs
- SecurityKeyUsage.cs
- VerbConverter.cs
- ProcessThread.cs
- RepeatInfo.cs
- DataControlCommands.cs
- ReturnType.cs
- WinFormsComponentEditor.cs
- DictionaryBase.cs
- TransactionManager.cs
- SplashScreen.cs
- listitem.cs
- SendActivity.cs
- Row.cs
- PluralizationServiceUtil.cs
- UserControlParser.cs
- DataGridViewCellMouseEventArgs.cs
- GradientStop.cs
- XmlElementCollection.cs
- Interlocked.cs
- DecimalStorage.cs
- SessionPageStatePersister.cs
- HttpsHostedTransportConfiguration.cs
- DataGridDesigner.cs
- HandledMouseEvent.cs
- EditorPart.cs
- DbProviderFactoriesConfigurationHandler.cs
- Directory.cs
- ServiceOperationViewControl.cs
- ModelUIElement3D.cs
- TextTreeObjectNode.cs
- StreamReader.cs
- ErrorProvider.cs
- ToolStripArrowRenderEventArgs.cs
- PathGeometry.cs
- XmlAnyElementAttribute.cs
- MILUtilities.cs
- CompressEmulationStream.cs
- ContainerActivationHelper.cs
- IEnumerable.cs
- GreenMethods.cs
- SharedMemory.cs
- BinaryObjectReader.cs
- MembershipSection.cs