Export (0) Print
Expand All

TcpTransportBindingElement Class

Represents the binding element for the TCP transport.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public class TcpTransportBindingElement : ConnectionOrientedTransportBindingElement

The TcpTransportBindingElement type exposes the following members.

  NameDescription
Public methodSupported in .NET for Windows Store appsTcpTransportBindingElement()Initializes a new instance of the TcpTransportBindingElement class.
Protected methodSupported in .NET for Windows Store appsTcpTransportBindingElement(TcpTransportBindingElement)Initializes a new instance of the TcpTransportBindingElement class.
Top

  NameDescription
Public propertyChannelInitializationTimeoutGets or sets a TimeSpan that determines the maximum time a channel can be in the initialization status before being disconnected. (Inherited from ConnectionOrientedTransportBindingElement.)
Public propertySupported in .NET for Windows Store appsConnectionBufferSizeGets or sets the size of the buffer used to transmit a chunk of the serialized message on the wire from the client or service. (Inherited from ConnectionOrientedTransportBindingElement.)
Public propertySupported in .NET for Windows Store appsConnectionPoolSettingsGets a collection of connection pool settings.
Public propertyExtendedProtectionPolicyGets or sets the current extended protection policy.
Public propertyHostNameComparisonModeGets or sets a value that indicates whether the hostname is used to reach the service when matching on the URI. (Inherited from ConnectionOrientedTransportBindingElement.)
Public propertyListenBacklogGets or sets the maximum number of queued connection requests that can be pending.
Public propertySupported in .NET for Windows Store appsManualAddressingGets or sets a value that indicates whether manual addressing of the message is required. (Inherited from TransportBindingElement.)
Public propertyMaxBufferPoolSizeGets or sets the maximum size, in bytes, of any buffer pools used by the transport. (Inherited from TransportBindingElement.)
Public propertySupported in .NET for Windows Store appsMaxBufferSizeGets or sets the maximum size of the buffer to use. For streamed messages, this value should be at least the maximum possible size of the message headers, which are read in buffered mode. (Inherited from ConnectionOrientedTransportBindingElement.)
Public propertyMaxOutputDelayGets or sets the maximum interval of time that a chunk of a message or a full message can remain buffered in memory before being sent out. (Inherited from ConnectionOrientedTransportBindingElement.)
Public propertyMaxPendingAcceptsGets or sets the maximum number of channels a service can have waiting on a listener for processing incoming connections to the service. (Inherited from ConnectionOrientedTransportBindingElement.)
Public propertyMaxPendingConnectionsGets or sets the maximum number of connections awaiting dispatch on the service. (Inherited from ConnectionOrientedTransportBindingElement.)
Public propertySupported in .NET for Windows Store appsMaxReceivedMessageSizeGets and sets the maximum allowable message size, in bytes, that can be received. (Inherited from TransportBindingElement.)
Public propertyPortSharingEnabledGets or sets a value that indicates whether TCP port sharing is enabled for this connection.
Public propertySupported in .NET for Windows Store appsSchemeReturns the URI scheme for the transport. (Overrides TransportBindingElement.Scheme.)
Public propertyTeredoEnabledGets or sets a Boolean that specifies whether Teredo (a technology for addressing clients that are behind firewalls) is enabled.
Public propertySupported in .NET for Windows Store appsTransferModeGets or sets a value that indicates whether the messages are buffered or streamed with the connection-oriented transport. (Inherited from ConnectionOrientedTransportBindingElement.)
Top

  NameDescription
Public methodSupported in .NET for Windows Store appsBuildChannelFactory<TChannel>Creates a channel factory that can be used to create a channel. (Overrides BindingElement.BuildChannelFactory<TChannel>(BindingContext).)
Public methodBuildChannelListener<TChannel>Creates a channel listener of the specified type. (Overrides BindingElement.BuildChannelListener<TChannel>(BindingContext).)
Public methodSupported in .NET for Windows Store appsCanBuildChannelFactory<TChannel>Determines whether a channel factory of the specified type can be built. (Inherited from ConnectionOrientedTransportBindingElement.)
Public methodCanBuildChannelListener<TChannel>Determines whether a channel listener of the specified type can be built. (Inherited from ConnectionOrientedTransportBindingElement.)
Public methodSupported in .NET for Windows Store appsCloneCreates a copy of the current binding element. (Overrides BindingElement.Clone().)
Public methodSupported in .NET for Windows Store appsEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodSupported in .NET for Windows Store appsFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported in .NET for Windows Store appsGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodSupported in .NET for Windows Store appsGetProperty<T>Gets a specified object from the BindingContext. (Overrides ConnectionOrientedTransportBindingElement.GetProperty<T>(BindingContext).)
Public methodSupported in .NET for Windows Store appsGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodSupported in .NET for Windows Store appsMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodShouldSerializeExtendedProtectionPolicyReturns an indication that the extended protection policy is not XAML serializable.
Public methodShouldSerializeListenBacklogIndicates whether the TCP transport binding element should serialize listen backlog.
Public methodShouldSerializeMaxPendingAcceptsIndicates whether the connection oriented transport binding element should serialize maximum pending accepts. (Inherited from ConnectionOrientedTransportBindingElement.)
Public methodShouldSerializeMaxPendingConnectionsIndicates whether the connection oriented transport binding element should serialize maximum pending connections. (Inherited from ConnectionOrientedTransportBindingElement.)
Public methodSupported in .NET for Windows Store appsToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Explicit interface implemetationPrivate methodIPolicyExportExtension.ExportPolicyExports a custom policy assertion about bindings. (Inherited from ConnectionOrientedTransportBindingElement.)
Explicit interface implemetationPrivate methodIWsdlExportExtension.ExportContractWrites custom Web Services Description Language (WSDL) elements into the generated WSDL for a contract. (Inherited from ConnectionOrientedTransportBindingElement.)
Explicit interface implemetationPrivate methodIWsdlExportExtension.ExportEndpointWrites custom Web Services Description Language (WSDL) elements into the generated WSDL for an endpoint. (Inherited from ConnectionOrientedTransportBindingElement.)
Top

This transport uses URIs of the form "net.tcp://hostname:port/path". Other URI components are optional.

The TcpTransportBindingElement class is the starting point for creating a custom binding that implements the TCP transport protocol. This transport is optimized for WCF-to-WCF communication.

The WCF service model uses this class to create factory objects that implement the IChannelFactory and IChannelListener interfaces. These factory objects, in turn, create and accept the channels that transmit SOAP messages using the TCP protocol.

You configure the factories that this class creates by setting its properties, such as PortSharingEnabled and LeaseTimeout.

You can also set properties on the base class ConnectionOrientedTransportBindingElement, such as MaxBufferSize, TransferMode, and ConnectionBufferSize. For a complete list of properties, see ConnectionOrientedTransportBindingElement.

Finally, you can set properties on the base class TransportBindingElement, such as ManualAddressing and MaxBufferPoolSize. For a complete list of properties, see TransportBindingElement.

The following example shows how to use this class.

TcpTransportBindingElement bElement =
    new TcpTransportBindingElement();

TcpConnectionPoolSettings connectionPoolSettings =
    bElement.ConnectionPoolSettings;

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

.NET for Windows Store apps

Supported in: Windows 8

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft