SocketError
SocketError
SocketError
SocketError
Class
Definition
Provides socket error status for operations on a DatagramSocket, StreamSocket, or StreamSocketListener.
public : static class SocketErrorpublic static class SocketErrorPublic Static Class SocketError// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
| Capabilities |
ID_CAP_NETWORKING [Windows Phone]
|
Remarks
An error encountered on socket operation is returned as HRESULT value. The GetStatus method on the SocketError object 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.
Methods
GetStatus(Int32) GetStatus(Int32) GetStatus(Int32) GetStatus(Int32)
Gets a SocketErrorStatus value based on an error encountered by a socket operation.
public : static SocketErrorStatus GetStatus(int hresult)public static SocketErrorStatus GetStatus(Int32 hresult)Public Static Function GetStatus(hresult As Int32) As SocketErrorStatus// You can use this method in JavaScript.
- hresult
- int Int32 Int32 Int32
The error encountered by a socket operation represented as an HRESULT.
The socket error status value for a socket operation.
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
| 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