TcpTransportBindingElement Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Represents the binding element for the Transmission Control Protocol (TCP) transport.

Inheritance Hierarchy

System.Object
  System.ServiceModel.Channels.BindingElement
    System.ServiceModel.Channels.TransportBindingElement
      System.ServiceModel.Channels.ConnectionOrientedTransportBindingElement
        System.ServiceModel.Channels.TcpTransportBindingElement

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

Syntax

'Declaration
Public Class TcpTransportBindingElement _
    Inherits ConnectionOrientedTransportBindingElement
public class TcpTransportBindingElement : ConnectionOrientedTransportBindingElement

The TcpTransportBindingElement type exposes the following members.

Constructors

  Name Description
Public method TcpTransportBindingElement() Initializes a new instance of the TcpTransportBindingElement class.
Protected method TcpTransportBindingElement(TcpTransportBindingElement) Initializes a new instance of the TcpTransportBindingElement class from an existing instance.

Top

Properties

  Name Description
Public property ConnectionBufferSize Gets 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 property ConnectionPoolSettings Gets a collection of connection pool settings.
Public property ManualAddressing Gets or sets a value that indicates whether manual addressing of the message is required. (Inherited from TransportBindingElement.)
Public property MaxBufferSize Gets or sets the maximum size of the buffer to use. (Inherited from ConnectionOrientedTransportBindingElement.)
Public property MaxReceivedMessageSize Gets and sets the maximum allowable message size that can be received. (Inherited from TransportBindingElement.)
Public property Scheme Returns the URI scheme for the transport. (Overrides TransportBindingElement.Scheme.)

Top

Methods

  Name Description
Public method BuildChannelFactory<TChannel> Creates a channel factory that can be used to create a channel. (Overrides BindingElement.BuildChannelFactory<TChannel>(BindingContext).)
Public method CanBuildChannelFactory<TChannel> Determines whether a channel factory of the specified type can be built. (Inherited from ConnectionOrientedTransportBindingElement.)
Public method Clone Creates a copy of the current binding element. (Overrides BindingElement.Clone().)
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetProperty<T> Gets a property from the specified BindingContext. (Inherited from TransportBindingElement.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

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 communication with Windows Communication Foundation (WCF) services. The Silverlight 5 programming model uses this class to create factory objects that implement the IChannelFactory interface. These factory objects, in turn, create the channels that transmit SOAP messages using the TCP protocol. You configure the factories that this class creates by setting its properties, such as ConnectionPoolSettings and LeaseTimeout.

You can also set properties on the base class ConnectionOrientedTransportBindingElement, such as MaxBufferSize, and ConnectionBufferSize.

Finally, you can set properties on the base class TransportBindingElement, such as ManualAddressing and MaxReceivedMessageSize.

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Thread Safety

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