WebSocketError.GetStatus Method

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

Syntax

public:
static WebErrorStatus GetStatus(
         int32 hresult
)  

Parameters

hresult
Type: int32 

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

Return value

Type: WebErrorStatus 

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.

Requirements

Namespace: Windows.Networking.Sockets

Metadata: windows.winmd

See also

Reference

WebSocketError Class

WebSocketError Members

Windows.Networking.Sockets Namespace