WebSocketClosedEventArgs
WebSocketClosedEventArgs
WebSocketClosedEventArgs
WebSocketClosedEventArgs
Class
Definition
Provides data for a closed event on a MessageWebSocket, StreamWebSocket, or IWebSocket object.
public : sealed class WebSocketClosedEventArgs : IWebSocketClosedEventArgspublic sealed class WebSocketClosedEventArgs : IWebSocketClosedEventArgsPublic NotInheritable Class WebSocketClosedEventArgs Implements IWebSocketClosedEventArgs// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
A WebSocketClosedEventArgs instance is created when the MessageWebSocket.Closed, StreamWebSocket.Closed, or IWebSocket.Closed event occurs.
Properties
Code Code Code Code
Gets information about the reason that a WebSocket object was closed.
public : ushort Code { get; }public ushort Code { get; }Public ReadOnly Property Code As ushort// You can use this property in JavaScript.
- Value
- ushort ushort ushort ushort
Status code indicating the reason for closure.
Remarks
Status codes in the range 0-999 are not used.
Status codes in the range 1000-2999 are reserved for definition by the WebSocket protocol.
Status codes in the range 3000-3999 are reserved for use by libraries, frameworks, and applications. These status codes are registered directly with IANA. The interpretation of these codes is undefined by the WebSocket protocol.
Status codes in the range 4000-4999 are reserved for private use and cannot be registered. Such codes can be used by prior agreements between WebSocket applications. The interpretation of these codes is undefined by the WebSocket protocol.
- See Also
Reason Reason Reason Reason
Gets additional details about the reason that a WebSocket object was closed.
public : PlatForm::String Reason { get; }public string Reason { get; }Public ReadOnly Property Reason As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
Detailed information about the closure.
- See Also