語言

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

規格需求 Description
裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)
應用程式功能
internetClient privateNetworkClientServer

備註

StreamWebSocketInformation 可在 StreamWebSocket 建立後隨時呼叫。

StreamWebSocketInformation 物件會自動與父 StreamWebSocket 物件建立。 StreamWebSocket.Information 屬性提供存取相關的 StreamWebSocketInformation 物件。

版本歷程記錄

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

屬性

名稱 Description
BandwidthStatistics

取得 StreamWebSocket 物件上的網路資料傳輸頻寬資訊。

請注意,回傳的統計數據是基於擴充 TCP 統計,該統計在 Windows 用戶端版本預設啟用,但在 Windows 伺服器版本因效能考量預設關閉。 若無法提供擴充的 TCP 統計資料,則所有回傳的數值統計資料皆設為 0,布林統計則設為 false。

LocalAddress

取得與 StreamWebSocket 物件相關聯的 IP 位址。

Protocol

在 WebSocket物件的 WebSocket 握手時,與伺服器協商 WebSocket 子協定。

ServerCertificate

當建立安全 WebSocket 連線時,會取得伺服器提供的憑證。

ServerCertificateErrors

會獲得建立安全 StreamWebSocket 連線時發生的錯誤清單。

ServerCertificateErrorSeverity

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

ServerIntermediateCertificates

在與 StreamWebSocket 伺服器建立 SSL 連線時,接收伺服器在 SSL 協商時所傳送的中介憑證。

適用於

另請參閱