Winsock Error Codes - Brought to you by Winsock-Error.com

10047 "Address family not supported by protocol family."

WSAEAFNOSUPPORT (Winsock error number: 10047)

Microsoft say this about Winsock error 10047 - WSAEAFNOSUPPORT:

An address incompatible with the requested protocol was used. All sockets are created with an associated address family (that is, AF_INET for Internet Protocols) and a generic protocol type (that is, SOCK_STREAM). This error is returned if an incorrect protocol is explicitly requested in the socket call, or if an address of the wrong family is used for a socket, for example, in sendto.

Full details of Winsock TCP error 10047 - WSAEAFNOSUPPORT:

Berkeley description: An address incompatible with the requested protocol was used. For example, you shouldn't necessarily expect to be able to use NS addresses with ARPA Internet protocols.

WinSock description: Same as Berkeley, and then some. The error occurs with the function, which takes the socket type (protocol) and address family as input parameters.

It also occurs with functions that take a socket handle and a sockaddr structure as input parameters. A socket already has a type (a protocol), and each sockaddr structure has an address family field to define its format. A function fails with WSAEAFNOSUPPORT if the address family referenced in sockaddr is not compatible with the referenced socket's protocol.

This error apparently also takes the place of WSAEPFNOSUPPORT (which means "protocol family not supported"), since that error is not listed for in the v1.1 WinSock specification.

   
This page is designed to help you to understand Winsock TCP error 10047. It will not necessarily mean you can instantly fix issues when your computer tells you that Winsock is having problems with code 10047, rather it will give you the necessary background information to help solve the matter.

Programming declarations for 10047 (WSAEAFNOSUPPORT):

C#
long WSAEAFNOSUPPORT = 10047 ;

VB.net
Dim WSAEAFNOSUPPORT As Long = 10047

VB6
Dim WSAEAFNOSUPPORT As Long
WSAEAFNOSUPPORT = 10047