共用方式為


<tcpTransport>

定義 TCP 傳輸,通道可使用此傳輸來傳輸自訂繫結的訊息。

結構描述階層

<system.serviceModel>
  <bindings>
    <customBinding>
      <binding>
        <tcpTransport>

語法

<tcpTransport 
    listenBacklog="Integer"
        portSharingEnabled="Boolean"
    teredoEnabled="Boolean"
    transferMode=”Buffered/Streamed” 
        <connectionPoolSettings
          groupName=”String” 
        idleTimeout"TimeSpan"
        leaseTimeout="TimeSpan"
        maxOutboundConnectionsPerEndpopint=”Integer” />
/>

屬性和元素

下列各節說明屬性、子項目和父項目。

屬性

屬性 描述

listenBacklog

正整數,指定在接聽程式上等待接受的通道數目上限。超過這個限制的連線都會進入佇列,直到低於此限制的空間可用為止。connectionLeaseTimeout 屬性會限制用戶端在擲回連線例外狀況之前,等待連線的持續時間。預設為 10。

portSharingEnabled

布林值,指定是否啟用這個連線的 TCP 連接埠共用功能。如果這是 false,則每個繫結將使用它自己的獨佔連接埠。預設為 false

這個設定只與服務有關。用戶端不受影響。

使用這個設定必須將 [啟動類型] 改為 [手動] 或 [自動],以啟用 Windows Communication Foundation (WCF) TCP Port Sharing Service。

teredoEnabled

布林值,指定是否啟用 Teredo (對防火牆後的用戶端進行定址的技術)。預設為 false

這個屬性會針對基礎 TCP 通訊端啟用 Teredo。如需詳細資訊,請參閱 Teredo 概觀 (本頁面可能為英文)。

這個屬性僅適用於 Windows XP SP2 和 Windows Server 2003。Windows Vista 具有整部機器的 Teredo 組態選項,因此當執行 Vista 時,會忽略這個屬性。Teredo 需要用戶端和服務電腦都已安裝 Microsoft IPv6 堆疊並正確設定,才能使用 Teredo。如需設定 Teredo 的詳細資訊,請參閱 Teredo 概觀 (本頁面可能為英文)。如需詳細資訊,請參閱 Windows Server 2003 技術中心 (本頁面可能為英文)。

項目子系

父項目

項目 描述

<binding>

定義自訂繫結的所有繫結功能。

備註

這個傳輸會使用以下格式的 URI "net.tcp://hostname:port/path"。其他 URI 元件是選擇性的。

tcpTransport 項目是在建立自訂繫結時的起點,該繫結會實作 TCP 傳輸通訊協定。這個傳輸已針對 WCF 至 WCF 的通訊最佳化。

另請參閱

參考

<customBinding>
TcpTransportElement
TcpTransportBindingElement
TransportBindingElement
CustomBinding

其他資源

Transports in Windows Communication Foundation
Choosing a Transport
Windows Communication Foundation Bindings
Extending Bindings
Custom Bindings