Site icon EfmSoft

What does Windows error code 10047 (WSAEAFNOSUPPORT) mean?

 
Previous Next
WSAEPFNOSUPPORT WSAEADDRINUSE

WSAEAFNOSUPPORT

WSAEAFNOSUPPORT indicates an address-family mismatch. The socket may have been created successfully, but the address later supplied to connect, bind, sendto, or a similar call belongs to a family that cannot be used with that socket.

A common IPv4/IPv6 failure

An IPv4 socket expects an IPv4 sockaddr_in; an IPv6 socket expects sockaddr_in6. Passing the wrong structure, copying an address without preserving its family, or using a stale cached endpoint after changing resolver policy can produce this code. It differs from WSAEPFNOSUPPORT: the latter concerns availability of a protocol family, while this error concerns the particular address supplied to a socket.

What to log

Microsoft: connect · Microsoft: GetAddrInfo · The Open Group: socket address families


Looking for a different code? Search another status or error code.

Exit mobile version