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
- BaseEntityWrapper.cs
- GPRECT.cs
- ProviderCommandInfoUtils.cs
- TemplateControlCodeDomTreeGenerator.cs
- DecimalFormatter.cs
- PersonalizableAttribute.cs
- XPathDocumentIterator.cs
- ConnectionOrientedTransportBindingElement.cs
- ProviderConnectionPointCollection.cs
- DebugTraceHelper.cs
- StdValidatorsAndConverters.cs
- HttpResponse.cs
- CheckBoxField.cs
- ClosureBinding.cs
- DiscoveryRequestHandler.cs
- LabelAutomationPeer.cs
- SamlAuthenticationClaimResource.cs
- SafeHandle.cs
- ObjectKeyFrameCollection.cs
- MenuItemBinding.cs
- FormViewUpdatedEventArgs.cs
- DecoderExceptionFallback.cs
- SequenceFullException.cs
- AutoScrollExpandMessageFilter.cs
- Pkcs7Signer.cs
- XsltException.cs
- BitmapEffectrendercontext.cs
- MultiByteCodec.cs
- XPathNodeIterator.cs
- WorkflowDispatchContext.cs
- _AutoWebProxyScriptHelper.cs
- Expression.cs
- ProcessHostMapPath.cs
- XpsFixedDocumentSequenceReaderWriter.cs
- MergeExecutor.cs
- ReaderWriterLock.cs
- MSHTMLHost.cs
- SkewTransform.cs
- SessionPageStatePersister.cs
- TemplateFactory.cs
- DataGridViewSelectedColumnCollection.cs
- NumericUpDownAccelerationCollection.cs
- KeyInterop.cs
- control.ime.cs
- SaveFileDialog.cs
- GeometryValueSerializer.cs
- X509Certificate.cs
- GlobalProxySelection.cs
- ArraySegment.cs
- ExternalCalls.cs
- BaseCollection.cs
- MailMessageEventArgs.cs
- FlowDecision.cs
- MailMessage.cs
- PageSetupDialog.cs
- CreateUserErrorEventArgs.cs
- SimpleTextLine.cs
- JoinSymbol.cs
- TCPListener.cs
- DataContractJsonSerializerOperationBehavior.cs
- SynchronizedInputProviderWrapper.cs
- DaylightTime.cs
- TraceRecord.cs
- DetailsViewCommandEventArgs.cs
- ApplicationFileCodeDomTreeGenerator.cs
- SpellerError.cs
- SqlDelegatedTransaction.cs
- PrtCap_Base.cs
- DataBoundControlHelper.cs
- AnimationLayer.cs
- ListInitExpression.cs
- XmlAutoDetectWriter.cs
- BufferedGraphicsContext.cs
- SatelliteContractVersionAttribute.cs
- XmlSchemaDatatype.cs
- TableAutomationPeer.cs
- RenameRuleObjectDialog.Designer.cs
- EventDescriptor.cs
- PrePrepareMethodAttribute.cs
- ProgressiveCrcCalculatingStream.cs
- TimeStampChecker.cs
- DateTime.cs
- Input.cs
- ContentOperations.cs
- LassoHelper.cs
- Cursor.cs
- KeyValuePair.cs
- CultureMapper.cs
- ContextStack.cs
- DiscreteKeyFrames.cs
- TreeNodeBindingDepthConverter.cs
- NetPipeSection.cs
- TimersDescriptionAttribute.cs
- HtmlLink.cs
- ToolStripItem.cs
- WindowHelperService.cs
- InheritanceAttribute.cs
- basemetadatamappingvisitor.cs
- Substitution.cs
- ProfileEventArgs.cs