I swear I've seen this asked before, but I can't hit upon the magic search string to find it for me:
I create a socket for listening using:
s = socket()...
getaddrinfo("::1",...);
bind()...
and I end up with an IPV6 socket bound to "::1" and an IPV4 socket bound to "0.0.0.0". I expect to get the IPV4 socket bound to "127.0.0.1". Why is this happening, and how can I fix it to only accept localhost connections on the ipv4 socket as wel?
This is on Win7 and I've previously turned off IPV6_V6ONLY.