语言

StreamWebSocketInformation 类

定义

提供有关 StreamWebSocket 对象的套接字信息。

public ref class StreamWebSocketInformation sealed : IWebSocketInformation
public ref class StreamWebSocketInformation sealed : IWebSocketInformation2
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class StreamWebSocketInformation final : IWebSocketInformation
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class StreamWebSocketInformation final : IWebSocketInformation2
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class StreamWebSocketInformation : IWebSocketInformation
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class StreamWebSocketInformation : IWebSocketInformation2
Public NotInheritable Class StreamWebSocketInformation
Implements IWebSocketInformation
Public NotInheritable Class StreamWebSocketInformation
Implements IWebSocketInformation2
继承
Object Platform::Object IInspectable StreamWebSocketInformation
属性
实现

Windows 要求

要求 说明
设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)
应用功能
internetClient privateNetworkClientServer

注解

创建 StreamWebSocket 后,可以随时调用 StreamWebSocketInformation 。

使用父 StreamWebSocket 对象自动创建 StreamWebSocketInformation 对象。 StreamWebSocket.Information 属性提供对关联的 StreamWebSocketInformation 对象的访问。

版本历史记录

Windows 版本 SDK 版本 附加值
1607 14393 ServerCertificate
1607 14393 ServerCertificateErrors
1607 14393 ServerCertificateErrorSeverity
1607 14393 ServerIntermediateCertificates

属性

名称 说明
BandwidthStatistics

获取 StreamWebSocket 对象上网络数据传输的带宽信息。

请注意,返回的统计信息基于扩展的 TCP 统计信息,这些统计信息默认在 Windows 的客户端版本上启用,但出于Windows的服务器版本的性能原因,默认禁用。 如果扩展 TCP 统计信息不可用,则所有返回的数字统计信息都设置为 0,布尔统计信息设置为 false。

LocalAddress

获取与 StreamWebSocket 对象关联的 IP 地址。

Protocol

获取在 StreamWebSocket对象上与服务器协商的 WebSocket 子协议。

ServerCertificate

获取在建立安全 WebSocket 连接时服务器提供的证书。

ServerCertificateErrors

获取建立安全 StreamWebSocket 连接时发生的错误的列表。

ServerCertificateErrorSeverity

获取与 StreamWebSocket 服务器建立 SSL 连接时发生的错误的类别。

ServerIntermediateCertificates

获取与 StreamWebSocket 服务器建立 SSL 连接时服务器在 SSL 协商期间发送的中间证书。

适用于

另请参阅