|
Sockets : Getaddrinfo call fails
I call getaddrinfo in my socket client program (c++) and
it fails with ECONNREFUSED : No on listening on the remote address.
Code :
getaddrinfo("localhost",0,0, &addinfo);
Iptables is stopped.Netstat shows the machine listening on ftp, http at least.
Tried running the program as root and still the same.
If I change the call to :
getaddrinfo("localhost",80,0, &addinfo);
it failes with a EAI_SERVICE.
I can telnet into port 80 ( http) and do a GET fine!
What's up?
|