語言

StreamSocketControl.MinProtectionLevel 屬性

定義

限制開發者使用 ConnectAsync() 或 UpgradeToSslAsync() 方法時所協商的 TLS 協定版本,這些方法需要 TLS。

public:
 property SocketProtectionLevel MinProtectionLevel { SocketProtectionLevel get(); void set(SocketProtectionLevel value); };
SocketProtectionLevel MinProtectionLevel();

void MinProtectionLevel(SocketProtectionLevel value);
public SocketProtectionLevel MinProtectionLevel { get; set; }
var socketProtectionLevel = streamSocketControl.minProtectionLevel;
streamSocketControl.minProtectionLevel = socketProtectionLevel;
Public Property MinProtectionLevel As SocketProtectionLevel

屬性值

一個 SocketProtectionLevel 列舉成員,表示插座保護等級。

Windows 需求

規格需求 Description
裝置系列
Windows 10 Fall Creators Update (已於 10.0.16299.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v5.0 引進)

備註

當伺服器未符合 MinProtectionLevel 指定的 TLS 版本時,對應的 ConnectAsync() 和/或 UpgradeToSslAsnc() 執行會表現得就像伺服器不支援 SSL 或 TLS 一樣。

適用於

另請參閱