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
- EventLogPermissionEntryCollection.cs
- Globals.cs
- BinaryConverter.cs
- QueryContinueDragEvent.cs
- WebEventTraceProvider.cs
- EntityException.cs
- MeasurementDCInfo.cs
- ReplyChannel.cs
- DbResourceAllocator.cs
- BufferedGraphics.cs
- HttpRuntimeSection.cs
- Switch.cs
- RegexWriter.cs
- ToolStripControlHost.cs
- EdmMember.cs
- SoapServerProtocol.cs
- StackOverflowException.cs
- MemberInitExpression.cs
- FullTextLine.cs
- OrderByLifter.cs
- CodeArrayCreateExpression.cs
- DataGridViewTextBoxEditingControl.cs
- ACE.cs
- PropertyInfo.cs
- AppearanceEditorPart.cs
- SystemException.cs
- WebBrowsableAttribute.cs
- MetabaseServerConfig.cs
- Converter.cs
- UnauthorizedWebPart.cs
- RelationshipType.cs
- CodeEventReferenceExpression.cs
- DeploymentExceptionMapper.cs
- HtmlElementEventArgs.cs
- ParagraphVisual.cs
- SQLRoleProvider.cs
- SettingsPropertyCollection.cs
- XPathCompileException.cs
- RegistrationServices.cs
- XmlDictionaryString.cs
- CodeCatchClauseCollection.cs
- Helper.cs
- PathFigureCollectionConverter.cs
- ObjectListTitleAttribute.cs
- X509RecipientCertificateServiceElement.cs
- DateTimeStorage.cs
- XmlNavigatorStack.cs
- DataSourceControlBuilder.cs
- XPathException.cs
- _SSPISessionCache.cs
- QilStrConcatenator.cs
- DataControlPagerLinkButton.cs
- NominalTypeEliminator.cs
- ListBindingHelper.cs
- JsonDataContract.cs
- BindingCompleteEventArgs.cs
- CurrentChangedEventManager.cs
- PackageRelationshipSelector.cs
- TextWriter.cs
- ProxyAttribute.cs
- EntitySetBase.cs
- ParagraphVisual.cs
- NodeFunctions.cs
- SQLSingle.cs
- ScrollProperties.cs
- XmlCollation.cs
- Attributes.cs
- FormViewUpdatedEventArgs.cs
- EntityDataSourceWrapperCollection.cs
- EmptyControlCollection.cs
- HtmlInputImage.cs
- AncillaryOps.cs
- CacheHelper.cs
- XLinq.cs
- HybridCollection.cs
- FontResourceCache.cs
- PrinterSettings.cs
- ByteAnimation.cs
- VariableModifiersHelper.cs
- StrokeSerializer.cs
- SafeFileMapViewHandle.cs
- Comparer.cs
- ChameleonKey.cs
- OperationAbortedException.cs
- SR.cs
- OleDbEnumerator.cs
- DataControlButton.cs
- Evidence.cs
- FormViewPagerRow.cs
- SimpleLine.cs
- TimelineCollection.cs
- ToolStripProgressBar.cs
- SizeIndependentAnimationStorage.cs
- MimeReflector.cs
- MgmtResManager.cs
- TraceFilter.cs
- StickyNoteContentControl.cs
- DataPager.cs
- XPathSelfQuery.cs
- SqlBooleanizer.cs