TcpTransportBindingElement 類別

定義

表示 TCP 傳輸的繫結元素。

public ref class TcpTransportBindingElement : System::ServiceModel::Channels::ConnectionOrientedTransportBindingElement
public class TcpTransportBindingElement : System.ServiceModel.Channels.ConnectionOrientedTransportBindingElement
type TcpTransportBindingElement = class
    inherit ConnectionOrientedTransportBindingElement
Public Class TcpTransportBindingElement
Inherits ConnectionOrientedTransportBindingElement
繼承

範例

下列範例將示範如何使用這個類別。

TcpTransportBindingElement bElement =
    new TcpTransportBindingElement();

TcpConnectionPoolSettings connectionPoolSettings =
    bElement.ConnectionPoolSettings;

備註

此傳輸會使用格式為 「 net.tcp :// hostnameport/path 」 的 URI。 其他 URI 元件是選擇性的。

TcpTransportBindingElement 類別是一個起點,用來建立實作 TCP 傳輸通訊協定的自訂繫結。 此傳輸已針對 WCF 通訊進行優化。

WCF 服務模型會使用此類別來建立實作 和 IChannelListener 介面的 IChannelFactory Factory 物件。 然後,這些處理站物件會建立並接受使用 TCP 通訊協定傳送 SOAP 訊息的通道。

您可以藉由設定這個類別的屬性來設定其所建立的處理站,例如:PortSharingEnabledLeaseTimeout

您也能夠設定基底類別 ConnectionOrientedTransportBindingElement 的屬性,例如:MaxBufferSizeTransferMode,以及 ConnectionBufferSize。 如需完整的屬性清單,請參閱 ConnectionOrientedTransportBindingElement

最後,您可以設定基底類別 TransportBindingElement 的屬性,例如 ManualAddressingMaxBufferPoolSize。 如需完整的屬性清單,請參閱 TransportBindingElement

建構函式

TcpTransportBindingElement()

初始化 TcpTransportBindingElement 類別的新執行個體。

TcpTransportBindingElement(TcpTransportBindingElement)

初始化 TcpTransportBindingElement 類別的新執行個體。

屬性

ChannelInitializationTimeout

取得或設定 TimeSpan,決定通道在中斷連接之前,可以處於初始化狀態中的最長時間。

(繼承來源 ConnectionOrientedTransportBindingElement)
ConnectionBufferSize

取得或設定用來在用戶端或服務的網路上,傳輸已序列化訊息區塊 (Chunk) 的緩衝區大小。

(繼承來源 ConnectionOrientedTransportBindingElement)
ConnectionPoolSettings

取得連線集區設定的集合。

ExtendedProtectionPolicy

取得或設定目前延伸保護原則。

HostNameComparisonMode

取得或設定值,這個值會指出在比對 URI 時主機名稱是否會用來取用服務。

(繼承來源 ConnectionOrientedTransportBindingElement)
ListenBacklog

取得或設定可以擱置之佇列連線要求的最大數目。

ManualAddressing

取得或設定值,這個值會指出是否需要訊息的手動定址。

(繼承來源 TransportBindingElement)
MaxBufferPoolSize

取得或設定傳輸所使用之任何緩衝區集區的大小上限 (以位元組為單位)。

(繼承來源 TransportBindingElement)
MaxBufferSize

取得或設定要使用之緩衝區的大小上限。 對於已進行資料流處理的訊息,這個值至少應為訊息標頭的最大可能大小 (可在緩衝模式中讀取)。

(繼承來源 ConnectionOrientedTransportBindingElement)
MaxOutputDelay

取得或設定訊息區塊或完整訊息在送出之前,可以在記憶體中保持緩衝的最大時間間隔。

(繼承來源 ConnectionOrientedTransportBindingElement)
MaxPendingAccepts

取得或設定服務可使其等待接聽程式以處理服務之連入連線的通道最大數目。

(繼承來源 ConnectionOrientedTransportBindingElement)
MaxPendingConnections

取得或設定服務上等待分派之連線的數目上限。

(繼承來源 ConnectionOrientedTransportBindingElement)
MaxReceivedMessageSize

取得或設定可接收之可允許的訊息大小上限 (以位元組為單位)。

(繼承來源 TransportBindingElement)
PortSharingEnabled

取得或設定值,指出是否為這個連線啟用 TCP 連接埠共用。

Scheme

傳回用於傳輸的 URI 配置。

TeredoEnabled

取得或設定值,這個值表示 Teredo 是否 (技術,以定址防火牆後方) 的用戶端。

TransferMode

取得或設定值,這個值表示訊息是否使用連線導向傳輸進行緩衝或資料流處理。

(繼承來源 ConnectionOrientedTransportBindingElement)

方法

BuildChannelFactory<TChannel>(BindingContext)

建立可用來建立通道的通道處理站。

BuildChannelListener<TChannel>(BindingContext)

建立指定型別的通道接聽程式。

BuildChannelListener<TChannel>(BindingContext)

初始化通道接聽項,以便從繫結內容接受指定之類型的通道。

(繼承來源 BindingElement)
CanBuildChannelFactory<TChannel>(BindingContext)

判斷是否可以建置指定之型別的通道處理站。

(繼承來源 ConnectionOrientedTransportBindingElement)
CanBuildChannelListener<TChannel>(BindingContext)

判斷是否可以建置指定之型別的通道接聽項。

(繼承來源 ConnectionOrientedTransportBindingElement)
Clone()

建立目前繫結項目的複本。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetProperty<T>(BindingContext)

BindingContext 中取得指定的物件。

GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ShouldSerializeExtendedProtectionPolicy()

傳回延伸保護原則不可進行 Xaml 序列化的表示。

ShouldSerializeListenBacklog()

指出 TCP 傳輸繫結項目是否應該序列化接聽待處理項目。

ShouldSerializeMaxPendingAccepts()

指出連線導向的傳輸繫結項目是否應序列化暫止接受的上限。

(繼承來源 ConnectionOrientedTransportBindingElement)
ShouldSerializeMaxPendingConnections()

指出連線導向的傳輸繫結項目是否應序列化暫止連線的上限。

(繼承來源 ConnectionOrientedTransportBindingElement)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

明確介面實作

IPolicyExportExtension.ExportPolicy(MetadataExporter, PolicyConversionContext)

匯出關於繫結的自訂原則判斷提示。

(繼承來源 ConnectionOrientedTransportBindingElement)
IWsdlExportExtension.ExportContract(WsdlExporter, WsdlContractConversionContext)

將自訂的 Web 服務描述語言 (WSDL) 項目寫入為合約產生的 WSDL。

(繼承來源 ConnectionOrientedTransportBindingElement)
IWsdlExportExtension.ExportEndpoint(WsdlExporter, WsdlEndpointConversionContext)

將自訂的 Web 服務描述語言 (WSDL) 項目寫入為端點產生的 WSDL。

(繼承來源 ConnectionOrientedTransportBindingElement)

適用於