Delen via


WebSocketError.GetStatus(Int32) Method

Definition

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

public:
 static WebErrorStatus GetStatus(int hresult);
 static WebErrorStatus GetStatus(int const& hresult);
public static WebErrorStatus GetStatus(int hresult);
function getStatus(hresult)
Public Shared Function GetStatus (hresult As Integer) As WebErrorStatus

Parameters

hresult
Int32

int

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.

Applies to

See also