SocketError.GetStatus | getStatus method

Applies to Windows and Windows Phone

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

Syntax


var socketErrorStatus = Windows.Networking.Sockets.SocketError.getStatus(hresult);

Parameters

hresult

Type: Number [JavaScript] | System.Int32 [.NET] | int32 [C++]

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

Return value

Type: SocketErrorStatus

The socket error status value for a socket operation.

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.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows.Networking.Sockets
Windows::Networking::Sockets [C++]

Metadata

Windows.winmd

DLL

Windows.Networking.dll

Capabilities

ID_CAP_NETWORKING [Windows Phone]

See also

SocketError
SocketErrorStatus

 

 

Show:
© 2014 Microsoft