socket error while connecting to a IPv6 server on Windows 7 machine from a IPv4 client
I have a TCP/IP server running on the Windows 7 machine. I call the function getaddrinfo which returns the ::0 address (IPV6_ADDR_ANY). I use the following options while calling this function: hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_PASSIVE; I then bind the socket to a port using this address. I also have a TCP/IP client running on Windows Server 2003 machine. When I call the getaddrinfo function on the client passing the hostname of the Windows 7 machine it returns the IPv4 address for the Windows 7 machine running the server. Now when I do a connect call from the TCP/IP client to the Windows 7 machine I get a socket error 10061 which means that the Windows 7 machine actively refused the socket connection. Any clues how to fix this ? The firewall on the Windows 7 machine is turned off. In the TCP/IP server if I bind the socket to the IPV4_ADDR_ANY(0.0.0.0) by passing AF_INET in the hints.ai_family then everything works fine.
August 9th, 2010 12:36pm

Hi nit.goyal, It's better to post this question on MSDN forum: Windows Developer Center Also, you can refer to this MSDN library article for more information: getaddrinfo Function Regards, Linda Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
August 11th, 2010 9:42am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics