WebSocketError WebSocketError WebSocketError WebSocketError Class


Provides socket error status on a MessageWebSocket or StreamWebSocket object.

public : static class WebSocketError
public static class WebSocketError
Public Static Class WebSocketError
// This class does not provide a public constructor.
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


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
var webErrorStatus = Windows.Networking.Sockets.WebSocketError.getStatus(hresult);
int Int32 Int32 Int32

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


The socket error status value for a WebSocket operation.


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