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 需求

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

備註

這個物件的實例是由系統所建立,並以引數的形式傳遞至已註冊的事件處理常式。

屬性

ServerCertificate

伺服器所提供的憑證以進行驗證。

ServerCertificateErrors

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

ServerCertificateErrorSeverity

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

ServerIntermediateCertificates

從目前正在驗證的驗證程式中取得中繼憑證清單。

方法

GetDeferral()

取得管理驗證作業的 Deferral 物件。 當您開始驗證作業時呼叫這個方法,並在作業完成時呼叫 Deferral.Complete

Reject()

拒絕此伺服器的驗證。 當您的驗證判斷不應該連線到伺服器時,請呼叫這個方法。

適用於