SocketErrorStatus enumeration

SocketErrorStatus enumeration

Specifies status values for a socket operation.


var value = Windows.Networking.Sockets.SocketErrorStatus.unknown;


The SocketErrorStatus enumeration has these members.

Unknown | unknown0

The socket status is unknown.

OperationAborted | operationAborted1

The operation was aborted.

HttpInvalidServerResponse | httpInvalidServerResponse2

A bad response was received from the HTTP server.

ConnectionTimedOut | connectionTimedOut3

A connection timeout was exceeded.

AddressFamilyNotSupported | addressFamilyNotSupported4

The address family is not supported.

SocketTypeNotSupported | socketTypeNotSupported5

The socket type is not supported.

HostNotFound | hostNotFound6

The host was not found.

NoDataRecordOfRequestedType | noDataRecordOfRequestedType7

The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for.

NonAuthoritativeHostNotFound | nonAuthoritativeHostNotFound8

This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server.

ClassTypeNotFound | classTypeNotFound9

The specified class was not found.

AddressAlreadyInUse | addressAlreadyInUse10

The address is already in use.

CannotAssignRequestedAddress | cannotAssignRequestedAddress11

Cannot assign requested address.

ConnectionRefused | connectionRefused12

The connection was refused.

NetworkIsUnreachable | networkIsUnreachable13

The network is unreachable.

UnreachableHost | unreachableHost14

The host is unreachable.

NetworkIsDown | networkIsDown15

The network is down.

NetworkDroppedConnectionOnReset | networkDroppedConnectionOnReset16

The network dropped connection on reset.

SoftwareCausedConnectionAbort | softwareCausedConnectionAbort17

Software caused a connection abort.

ConnectionResetByPeer | connectionResetByPeer18

The connection was reset by the peer.

HostIsDown | hostIsDown19

The host is down.

NoAddressesFound | noAddressesFound20

The pipe is being closed.

TooManyOpenFiles | tooManyOpenFiles21

Too many open files.

MessageTooLong | messageTooLong22

A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram was smaller than the datagram itself.

CertificateExpired | certificateExpired23

A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file. This error is also returned if the validity periods of the certification chain do not nest correctly.

CertificateUntrustedRoot | certificateUntrustedRoot24

A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider. This error is also returned if a certificate chain could not be built to a trusted root authority.

CertificateCommonNameIsIncorrect | certificateCommonNameIsIncorrect25

The certificate is not valid for the requested usage. This error is also returned if the certificate has an invalid name. The name is not included in the permitted list or is explicitly excluded.

CertificateWrongUsage | certificateWrongUsage26

The certificate is not valid for the requested usage.

CertificateRevoked | certificateRevoked27

A certificate was explicitly revoked by its issuer. This error is also returned if the certificate was explicitly marked as untrusted by the user.

CertificateNoRevocationCheck | certificateNoRevocationCheck28

The revocation function was unable to check revocation for the certificate.

CertificateRevocationServerOffline | certificateRevocationServerOffline29

The revocation function was unable to check revocation because the revocation server was offline.

CertificateIsInvalid | certificateIsInvalid30

The supplied certificate is invalid. This can be returned for a number of reasons:

  • A certificate that can only be used as an end-entity is being used as a CA or vice versa.
  • A path length constraint in the certification chain has been violated.
  • A certificate contains an unknown extension that is marked critical.
  • A certificate is being used for a purpose other than the ones specified by its CA.
  • A parent of a given certificate in fact did not issue that child certificate.
  • A certificate is missing or has an empty value for an important field, such as a subject or issuer name.
  • The signature of the certificate cannot be verified.
  • The certificate has an invalid policy.
  • A certificate's basic constraint extension has not been observed.


An error encountered on socket operation is returned as HRESULT value. The SocketError.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.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0


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




Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8


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







See also




© 2017 Microsoft