问题
Although the searched FQDN appears in etc\hosts file.
Any idea? Thanks a lot!
回答1:
Since I don't have code, here's a guess:
getaddrinfo("http://www.example.com");
Doesn't work; getaddrinfo takes a hostname not a URL.
回答2:
Take a look at this hostname not translated into an IP address using Winsock
getaddrinfo may be giving you an IPv6 address, or perhaps the machine has more than one IP address and you're trying to connect to the wrong one.
来源:https://stackoverflow.com/questions/995532/getaddrinfo-returns-always-11001-host-not-found