SocketError.GetStatus(Int32) SocketError.GetStatus(Int32) SocketError.GetStatus(Int32) SocketError.GetStatus(Int32) SocketError.GetStatus(Int32) Method

Definition

Gets a SocketErrorStatus value based on an error encountered by a socket operation.

public : static SocketErrorStatus GetStatus(int hresult)
static SocketErrorStatus GetStatus(int32_t hresult) const;
public static SocketErrorStatus GetStatus(Int32 hresult)
Public Shared Function GetStatus(hresult As Int32) As SocketErrorStatus
var socketErrorStatus = Windows.Networking.Sockets.SocketError.getStatus(hresult);
Parameters
hresult
Int32 Int32 Int32

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

Returns

The socket error status value for a socket operation.

Additional features and requirements
Capabilities
ID_CAP_NETWORKING [Windows Phone]

Remarks

An error encountered on socket operation is returned as HRESULT value. The GetStatus method is used to convert an error from a socket operation to a SocketErrorStatus enumeration value. Most of the SocketErrorStatus enumeration values correspond to an error returned by the native Windows sockets operation.

The SocketError object and the GetStatus method would be used when the developer wants to programmatically handle errors that occur during the operation of an app.

See Also