共用方式為


SocketElement.IPProtectionLevel 屬性

定義

取得或設定一個值,指定 socket 的預設 IPProtectionLevel 值。

public:
 property System::Net::Sockets::IPProtectionLevel IPProtectionLevel { System::Net::Sockets::IPProtectionLevel get(); void set(System::Net::Sockets::IPProtectionLevel value); };
[System.Configuration.ConfigurationProperty("ipProtectionLevel", DefaultValue=System.Net.Sockets.IPProtectionLevel.Unspecified)]
public System.Net.Sockets.IPProtectionLevel IPProtectionLevel { get; set; }
[<System.Configuration.ConfigurationProperty("ipProtectionLevel", DefaultValue=System.Net.Sockets.IPProtectionLevel.Unspecified)>]
member this.IPProtectionLevel : System.Net.Sockets.IPProtectionLevel with get, set
Public Property IPProtectionLevel As IPProtectionLevel

屬性值

目前實例的 值 IPProtectionLevel

屬性

備註

IPProtectionLevel 特性允許將 IPv6 套接字設定限制至指定範圍,例如具有相同連結本地或站點本地前綴的位址。 此選項允許應用程式對 IPv6 套接字設置存取限制。 這些限制使得運行於私有區域網路上的應用程式能夠簡單且穩健地強化自身,抵禦外部攻擊。 此選項可擴大或縮小監聽套接字的範圍,允許公共及私人使用者在適當時不受限制地存取,或僅限制存取同一站點。 此選項在列 System.Net.Sockets.IPProtectionLevel 舉中指定了三個保護等級。

適用於

另請參閱