TcpTransportElement.PortSharingEnabled 屬性

定義

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

public:
 property bool PortSharingEnabled { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("portSharingEnabled", DefaultValue=false)]
public bool PortSharingEnabled { get; set; }
[<System.Configuration.ConfigurationProperty("portSharingEnabled", DefaultValue=false)>]
member this.PortSharingEnabled : bool with get, set
Public Property PortSharingEnabled As Boolean

屬性值

如果啟用 TCP 連接埠共用,則為 true,如果各繫結使用自己的獨占連接埠,則為 false。 預設值是 false

屬性

備註

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

使用此設定需要將 Windows Communication Foundation (WCF) TCP 埠共用服務,方法是將其啟動類型變更為手動或自動。

如需 TCP 接聽程式及其啟動方式的詳細資訊,請參閱 TcpListener

適用於