WebSocketError WebSocketError WebSocketError WebSocketError Class

Definition

Provides socket error status on a MessageWebSocket or StreamWebSocket object.

public : static class WebSocketErrorpublic static class WebSocketErrorPublic Static Class WebSocketError// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Methods

GetStatus(Int32) GetStatus(Int32) GetStatus(Int32) GetStatus(Int32)

Gets a WebErrorStatus value based on an error encountered by a WebSocket operation.

public : static WebErrorStatus GetStatus(int hresult)public static WebErrorStatus GetStatus(Int32 hresult)Public Static Function GetStatus(hresult As Int32) As WebErrorStatus// You can use this method in JavaScript.
Parameters
hresult
int Int32 Int32 Int32

The error encountered by a WebSocket operation represented as an HRESULT.

Returns

The socket error status value for a WebSocket operation.

Remarks

An error encountered on a WebSocket operation is returned as HRESULT value. The GetStatus method is used to convert an error from a WebSocket operation to a WebErrorStatus enumeration value. This can be useful for handling errors programmatically.

See Also