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
- UnknownBitmapDecoder.cs
- MonthChangedEventArgs.cs
- SharedPersonalizationStateInfo.cs
- SynchronizationLockException.cs
- OleDbPropertySetGuid.cs
- OdbcConnectionOpen.cs
- RequestCacheEntry.cs
- TransactionScopeDesigner.cs
- ConfigurationSectionGroup.cs
- AuthenticationModulesSection.cs
- XmlValidatingReaderImpl.cs
- ProcessMessagesAsyncResult.cs
- MultiTargetingUtil.cs
- Hashtable.cs
- InstanceLockTracking.cs
- WizardPanel.cs
- CultureInfoConverter.cs
- ActivityXamlServices.cs
- XmlSchemaExternal.cs
- EndpointDesigner.cs
- StrongNamePublicKeyBlob.cs
- DataRecordInternal.cs
- RootBrowserWindow.cs
- NopReturnReader.cs
- DataGridViewDataErrorEventArgs.cs
- HwndSubclass.cs
- FileUpload.cs
- Section.cs
- SQLInt64Storage.cs
- ValidationPropertyAttribute.cs
- TextElementEnumerator.cs
- InvalidTimeZoneException.cs
- StringCollection.cs
- StronglyTypedResourceBuilder.cs
- FontFamily.cs
- EventHandlerService.cs
- ToolStripPanelDesigner.cs
- TransformPattern.cs
- SiteIdentityPermission.cs
- BitmapEncoder.cs
- PageSetupDialog.cs
- HandledMouseEvent.cs
- EndOfStreamException.cs
- XmlDigitalSignatureProcessor.cs
- RuleAttributes.cs
- XmlSchemaProviderAttribute.cs
- XamlReader.cs
- GACIdentityPermission.cs
- HtmlButton.cs
- InstalledFontCollection.cs
- ValidatingReaderNodeData.cs
- JsonClassDataContract.cs
- ControlPropertyNameConverter.cs
- MethodToken.cs
- XomlCompilerResults.cs
- Interlocked.cs
- SQLDecimalStorage.cs
- RadioButtonList.cs
- SchemaTableOptionalColumn.cs
- TraceHandler.cs
- CodeDomConfigurationHandler.cs
- DesignTimeTemplateParser.cs
- TypeGenericEnumerableViewSchema.cs
- HttpPostedFile.cs
- KeyNotFoundException.cs
- SinglePageViewer.cs
- HttpModulesSection.cs
- XmlSchemaValidationException.cs
- AtomParser.cs
- PerformanceCountersElement.cs
- XmlSchemaRedefine.cs
- BuildResult.cs
- SqlCacheDependencySection.cs
- QuerySettings.cs
- ControlDesignerState.cs
- SourceFileBuildProvider.cs
- ApplicationManager.cs
- X509ScopedServiceCertificateElementCollection.cs
- ClientFormsIdentity.cs
- BinaryMessageFormatter.cs
- StandardTransformFactory.cs
- DecoratedNameAttribute.cs
- BevelBitmapEffect.cs
- TransactionFlowBindingElementImporter.cs
- TextDecorationCollectionConverter.cs
- InputQueue.cs
- ReservationNotFoundException.cs
- PackageDigitalSignature.cs
- DocumentGrid.cs
- TypeUtil.cs
- PerfProviderCollection.cs
- DataKey.cs
- HttpListenerPrefixCollection.cs
- XPathDescendantIterator.cs
- TextElement.cs
- AssemblySettingAttributes.cs
- InheritanceContextHelper.cs
- TextServicesProperty.cs
- Unit.cs
- RelatedPropertyManager.cs