共用方式為


WebSocketClosedEventArgs 類別

定義

提供MessageWebSocketStreamWebSocket 或 IWebSocket物件上已關閉事件的資料。

public ref class WebSocketClosedEventArgs sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class WebSocketClosedEventArgs final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class WebSocketClosedEventArgs
Public NotInheritable Class WebSocketClosedEventArgs
繼承
Object Platform::Object IInspectable WebSocketClosedEventArgs
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

當 MessageWebSocket.ClosedStreamWebSocket.Closed 或 IWebSocket.Closed事件發生時,就會建立 WebSocketClosedEventArgs 實例。

屬性

Code

取得 WebSocket 物件關閉原因的相關資訊。

Reason

取得有關 WebSocket 物件關閉原因的其他詳細資料。

適用於

另請參閱