語言

WebSocketServerCustomValidationRequestedEventArgs 類別

定義

提供 WebSocket 上的 ServerCustomValidationRequested 事件資料。 此事件發生於建立新的安全連線至WebSocket時,並讓您的程式碼有機會在連線建立前對伺服器憑證進行自訂驗證。

public ref class WebSocketServerCustomValidationRequestedEventArgs sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class WebSocketServerCustomValidationRequestedEventArgs final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class WebSocketServerCustomValidationRequestedEventArgs
Public NotInheritable Class WebSocketServerCustomValidationRequestedEventArgs
繼承
Object Platform::Object IInspectable WebSocketServerCustomValidationRequestedEventArgs
屬性

Windows 需求

規格需求 Description
裝置系列
Windows 10 Anniversary Edition (已於 10.0.14393.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v3.0 引進)

備註

系統會建立這個物件的實例,並作為參數傳遞給你註冊的事件處理器。

屬性

名稱 Description
ServerCertificate

伺服器提供的憑證供驗證。

ServerCertificateErrors

一份在驗證伺服器憑證時遇到的錯誤清單。

ServerCertificateErrorSeverity

會取得與此 WebSocket 伺服器建立 SSL 連線時發生的錯誤類別。

ServerIntermediateCertificates

取得目前驗證過程中的中介憑證清單。

方法

名稱 Description
GetDeferral()

取得管理驗證操作的 Deferral 物件。 開始驗證操作時呼叫此方法,操作完成後呼叫 Deferral.Complete 。

Reject()

拒絕對此伺服器的驗證。 當你的驗證確認你不應該連接伺服器時,再呼叫這個方法。

適用於