WebSocketServerCustomValidationRequestedEventArgs 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为 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
- 继承
- 属性
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() |
拒绝对此服务器的验证。 验证确定不应连接到服务器时调用此方法。 |