MessageWebSocketInformation 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
提供 MessageWebSocket 上的套接字資訊。
public ref class MessageWebSocketInformation sealed : IWebSocketInformation
public ref class MessageWebSocketInformation sealed : IWebSocketInformation2
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class MessageWebSocketInformation final : IWebSocketInformation
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class MessageWebSocketInformation final : IWebSocketInformation2
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class MessageWebSocketInformation : IWebSocketInformation
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class MessageWebSocketInformation : IWebSocketInformation2
Public NotInheritable Class MessageWebSocketInformation
Implements IWebSocketInformation
Public NotInheritable Class MessageWebSocketInformation
Implements IWebSocketInformation2
- 繼承
- 屬性
- 實作
Windows 需求
| 規格需求 | Description |
|---|---|
| 裝置系列 |
Windows 10 (已於 10.0.10240.0 引進)
|
| API contract |
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)
|
備註
MessageWebSocketInformation 可在 MessageWebSocket 建立後的任何時間呼叫。
MessageWebSocketInformation 物件會自動建立,使用父 MessageWebSocket 物件。 MessageWebSocket.Information 屬性提供對應的 MessageWebSocketInformation 物件存取權限。
版本歷程記錄
| Windows版本 | SDK 版本 | 附加價值 |
|---|---|---|
| 1607 | 14393 | ServerCertificate |
| 1607 | 14393 | ServerCertificateErrors |
| 1607 | 14393 | ServerCertificateErrorSeverity |
| 1607 | 14393 | ServerIntermediateCertificates |
屬性
| 名稱 | Description |
|---|---|
| BandwidthStatistics |
取得 MessageWebSocket 物件上的網路資料傳輸頻寬資訊。 請注意,回傳的統計數據是基於擴充 TCP 統計,該統計在 Windows 用戶端版本預設啟用,但在 Windows 伺服器版本因效能考量預設關閉。 若無法提供擴充的 TCP 統計資料,則所有回傳的數值統計資料皆設為 0,布林統計則設為 false。 |
| LocalAddress |
取得與 MessageWebSocket 物件相關的 IP 位址。 |
| Protocol |
在 MessageWebSocket 物件的 WebSocket 握手時,取得與伺服器協商的 WebSocket 子協定。 |
| ServerCertificate |
當建立安全 WebSocket 連線時,會取得伺服器提供的憑證。 |
| ServerCertificateErrors |
取得建立安全 WebSocket 連線時發生的錯誤清單。 |
| ServerCertificateErrorSeverity |
會取得與 WebSocket 伺服器建立 SSL 連線時發生的錯誤類別。 |
| ServerIntermediateCertificates |
在與 WebSockets 伺服器建立 SSL 連線時,接收伺服器在 SSL 協商時傳送的中介憑證。 |