Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / TcpChannelFactory.cs / 1 / TcpChannelFactory.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- // Enable this to dump contents of a connection a file. //#define CONNECTIONDUMP namespace System.ServiceModel.Channels { using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Text; using System.Threading; using System.Runtime.Serialization; using System.ServiceModel.Diagnostics; class TcpChannelFactory: ConnectionOrientedTransportChannelFactory , ITcpChannelFactorySettings { static TcpConnectionPoolRegistry connectionPoolRegistry = new TcpConnectionPoolRegistry(); TimeSpan leaseTimeout; public TcpChannelFactory(TcpTransportBindingElement bindingElement, BindingContext context) : base(bindingElement, context, bindingElement.ConnectionPoolSettings.GroupName, bindingElement.ConnectionPoolSettings.IdleTimeout, bindingElement.ConnectionPoolSettings.MaxOutboundConnectionsPerEndpoint) { this.leaseTimeout = bindingElement.ConnectionPoolSettings.LeaseTimeout; } public TimeSpan LeaseTimeout { get { return leaseTimeout; } } public override string Scheme { get { return Uri.UriSchemeNetTcp; } } internal override IConnectionInitiator GetConnectionInitiator() { IConnectionInitiator socketConnectionInitiator = new SocketConnectionInitiator( ConnectionBufferSize); #if CONNECTIONDUMP socketConnectionInitiator = new ConnectionDumpInitiator(socketConnectionInitiator); #endif return new BufferedConnectionInitiator(socketConnectionInitiator, MaxOutputDelay, ConnectionBufferSize); } internal override ConnectionPool GetConnectionPool() { return connectionPoolRegistry.Lookup(this); } internal override void ReleaseConnectionPool(ConnectionPool pool, TimeSpan timeout) { connectionPoolRegistry.Release(pool, timeout); } } } // 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
- IpcServerChannel.cs
- FileCodeGroup.cs
- LocalValueEnumerator.cs
- RayHitTestParameters.cs
- DelegatedStream.cs
- ApplicationManager.cs
- TransactionScopeDesigner.cs
- Table.cs
- CellParaClient.cs
- newinstructionaction.cs
- InstalledFontCollection.cs
- ScrollProperties.cs
- sortedlist.cs
- DbInsertCommandTree.cs
- TraceHandler.cs
- EntityDataSourceQueryBuilder.cs
- StringAttributeCollection.cs
- BaseCollection.cs
- SchemaTableOptionalColumn.cs
- LogLogRecordEnumerator.cs
- PropertyBuilder.cs
- DataDocumentXPathNavigator.cs
- EventHandlersStore.cs
- CompilerGlobalScopeAttribute.cs
- CodeAttributeArgumentCollection.cs
- Pkcs9Attribute.cs
- DataGridBoolColumn.cs
- HyperLinkStyle.cs
- PathSegmentCollection.cs
- MsdtcClusterUtils.cs
- BackStopAuthenticationModule.cs
- InfiniteTimeSpanConverter.cs
- ResourceDescriptionAttribute.cs
- GridViewRowPresenterBase.cs
- FloaterParagraph.cs
- ListSortDescription.cs
- ConfigurationPropertyCollection.cs
- _SingleItemRequestCache.cs
- SqlUtils.cs
- LogExtentCollection.cs
- SpotLight.cs
- MemoryMappedViewStream.cs
- SpecularMaterial.cs
- RoutedUICommand.cs
- HttpContext.cs
- COM2IPerPropertyBrowsingHandler.cs
- CounterSetInstance.cs
- WebPartsPersonalizationAuthorization.cs
- CrossContextChannel.cs
- WindowsRegion.cs
- GridItemProviderWrapper.cs
- DataRecordInternal.cs
- TimeStampChecker.cs
- Pair.cs
- PersonalizationStateInfoCollection.cs
- HyperLinkField.cs
- BitmapVisualManager.cs
- GridToolTip.cs
- ArcSegment.cs
- GenericRootAutomationPeer.cs
- GeneralTransform3DGroup.cs
- AssertSection.cs
- FamilyCollection.cs
- GenericWebPart.cs
- HostingEnvironment.cs
- Soap12ServerProtocol.cs
- ISAPIWorkerRequest.cs
- CodeVariableDeclarationStatement.cs
- FolderNameEditor.cs
- Executor.cs
- SecurityListenerSettingsLifetimeManager.cs
- SimpleWorkerRequest.cs
- SystemTcpConnection.cs
- CodeArrayIndexerExpression.cs
- GlobalizationAssembly.cs
- SchemaSetCompiler.cs
- SweepDirectionValidation.cs
- WebPartZone.cs
- DetailsViewActionList.cs
- XmlArrayItemAttribute.cs
- AnonymousIdentificationModule.cs
- EntityTemplateUserControl.cs
- PropertyPathWorker.cs
- Grid.cs
- TimeSpanValidator.cs
- PersonalizationEntry.cs
- StringCollection.cs
- newinstructionaction.cs
- ComAdminInterfaces.cs
- SessionStateModule.cs
- InfoCardTrace.cs
- KeySplineConverter.cs
- PersistenceProviderElement.cs
- TypedTableHandler.cs
- PublishLicense.cs
- DBParameter.cs
- httpapplicationstate.cs
- MSHTMLHostUtil.cs
- SaveFileDialog.cs
- UpnEndpointIdentity.cs