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
- HuffmanTree.cs
- IdleTimeoutMonitor.cs
- TabItemWrapperAutomationPeer.cs
- SystemKeyConverter.cs
- RootBuilder.cs
- latinshape.cs
- DocumentViewerBaseAutomationPeer.cs
- ZoneLinkButton.cs
- Cell.cs
- DataContractAttribute.cs
- ToolStripDropDownClosedEventArgs.cs
- JoinElimination.cs
- PersistenceTypeAttribute.cs
- UnsignedPublishLicense.cs
- _SpnDictionary.cs
- ParseElement.cs
- AuthenticateEventArgs.cs
- CqlQuery.cs
- Registry.cs
- DataGridViewCellMouseEventArgs.cs
- _Win32.cs
- HostProtectionException.cs
- BaseCollection.cs
- LineSegment.cs
- TypeNameConverter.cs
- CodeDOMProvider.cs
- ConvertTextFrag.cs
- _NestedSingleAsyncResult.cs
- SecurityHelper.cs
- mactripleDES.cs
- BrowserCapabilitiesFactoryBase.cs
- DataServices.cs
- TextParagraph.cs
- SqlUserDefinedAggregateAttribute.cs
- GridViewDeleteEventArgs.cs
- TypeTypeConverter.cs
- VisualBrush.cs
- PathHelper.cs
- WSHttpBindingBase.cs
- ReceiveParametersContent.cs
- SequentialActivityDesigner.cs
- NameTable.cs
- NotSupportedException.cs
- TextAdaptor.cs
- Stopwatch.cs
- NativeActivity.cs
- TextDecoration.cs
- ParserStreamGeometryContext.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- PropertyPathWorker.cs
- InheritanceContextChangedEventManager.cs
- XmlTextReader.cs
- ErrorRuntimeConfig.cs
- QuaternionValueSerializer.cs
- BaseCodeDomTreeGenerator.cs
- Rectangle.cs
- ValidationResults.cs
- NamespaceEmitter.cs
- WindowClosedEventArgs.cs
- RequiredFieldValidator.cs
- DataSourceHelper.cs
- SamlEvidence.cs
- CustomGrammar.cs
- MessageQueueTransaction.cs
- FlowDecisionDesigner.xaml.cs
- X509ChainElement.cs
- BrowserCapabilitiesCompiler.cs
- TransactionContext.cs
- SessionStateSection.cs
- CookieParameter.cs
- WaitingCursor.cs
- PocoEntityKeyStrategy.cs
- SafeArrayRankMismatchException.cs
- BitmapEffectDrawingContextWalker.cs
- ListViewSelectEventArgs.cs
- input.cs
- ExtractorMetadata.cs
- XamlHostingSection.cs
- Decoder.cs
- MetabaseServerConfig.cs
- WebRequest.cs
- XmlReaderSettings.cs
- DetailsViewInsertEventArgs.cs
- DescendantQuery.cs
- WsiProfilesElementCollection.cs
- MappingModelBuildProvider.cs
- InputReportEventArgs.cs
- WebPartMenuStyle.cs
- SqlGatherProducedAliases.cs
- PropertyNames.cs
- XPathAncestorIterator.cs
- StrokeNodeData.cs
- SQLDecimal.cs
- FileUtil.cs
- RemotingConfiguration.cs
- ArrayHelper.cs
- ClrPerspective.cs
- CreatingCookieEventArgs.cs
- TreeNode.cs
- Int16Animation.cs