WebSocketError WebSocketError WebSocketError WebSocketError Class

Provides socket error status on a MessageWebSocket or StreamWebSocket object.

Syntax

Declaration

public static class WebSocketErrorpublic static class WebSocketErrorPublic Static Class WebSocketError

Methods summary

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

Methods

  • GetStatus(System.Int32)
    GetStatus(System.Int32)
    GetStatus(System.Int32)
    GetStatus(System.Int32)

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

    public static WebErrorStatus GetStatus(System.Int32 hresult)public static WebErrorStatus GetStatus(System.Int32 hresult)Public Static Function GetStatus(hresult As System.Int32) As WebErrorStatus

    Parameters

    • hresult
      System.Int32
      System.Int32
      System.Int32
      System.Int32

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

    Returns

    Remarks

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

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.Networking.Sockets.dll