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
- FileLevelControlBuilderAttribute.cs
- DescendantOverDescendantQuery.cs
- TypeHelpers.cs
- EventLogPermissionEntryCollection.cs
- CachedPathData.cs
- DbParameterHelper.cs
- SoapClientMessage.cs
- GeometryHitTestParameters.cs
- ReflectionPermission.cs
- Pkcs7Signer.cs
- AccessDataSource.cs
- sitestring.cs
- SqlMethodTransformer.cs
- DataFieldCollectionEditor.cs
- XamlFrame.cs
- ToolStripDropDownClosingEventArgs.cs
- HotSpot.cs
- sqlcontext.cs
- ResourceContainer.cs
- ReversePositionQuery.cs
- OpCellTreeNode.cs
- Style.cs
- XsdDuration.cs
- SqlNotificationRequest.cs
- EnumerationRangeValidationUtil.cs
- CodeGen.cs
- Int32CAMarshaler.cs
- FillBehavior.cs
- ResourceCategoryAttribute.cs
- HttpHeaderCollection.cs
- ApplicationInfo.cs
- BooleanSwitch.cs
- ManagementOptions.cs
- TimeoutValidationAttribute.cs
- SessionParameter.cs
- JpegBitmapEncoder.cs
- ChannelDispatcherBase.cs
- TableStyle.cs
- CustomServiceCredentials.cs
- MenuItem.cs
- SetUserPreferenceRequest.cs
- SizeKeyFrameCollection.cs
- WebEventCodes.cs
- IDispatchConstantAttribute.cs
- ToolStripOverflow.cs
- OperationInvokerBehavior.cs
- Helpers.cs
- XmlCharacterData.cs
- Timeline.cs
- Command.cs
- MdImport.cs
- BindingUtils.cs
- CustomTypeDescriptor.cs
- oledbmetadatacolumnnames.cs
- AxImporter.cs
- SmiContext.cs
- NumericUpDownAcceleration.cs
- CollectionDataContractAttribute.cs
- ThicknessAnimationBase.cs
- FactoryRecord.cs
- HttpGetClientProtocol.cs
- StringBuilder.cs
- UpdatePanelTriggerCollection.cs
- SQLInt64Storage.cs
- TimeSpanStorage.cs
- FormParameter.cs
- DataTableNewRowEvent.cs
- MemberProjectedSlot.cs
- InvokeMemberBinder.cs
- ExternalDataExchangeClient.cs
- ConfigurationSectionCollection.cs
- ProbeMatchesCD1.cs
- PrimarySelectionGlyph.cs
- MonitoringDescriptionAttribute.cs
- SingleSelectRootGridEntry.cs
- HtmlImage.cs
- WebPart.cs
- SigningCredentials.cs
- LoadedOrUnloadedOperation.cs
- QilPatternVisitor.cs
- NamedPipeTransportElement.cs
- DoubleAnimationUsingPath.cs
- SafeSecurityHandles.cs
- mediapermission.cs
- View.cs
- MD5.cs
- PageParser.cs
- EncodingStreamWrapper.cs
- JoinElimination.cs
- WsdlInspector.cs
- WorkflowView.cs
- MtomMessageEncoder.cs
- URLMembershipCondition.cs
- ImpersonateTokenRef.cs
- ToolboxItemFilterAttribute.cs
- BaseTemplateCodeDomTreeGenerator.cs
- OutputScope.cs
- ControlParameter.cs
- DocumentOrderComparer.cs
- MissingMethodException.cs