Posted on 2001-09-10
I have the following code :
char server_ip = "18.104.22.168";
struct hostent *hp;
unsigned int addr;
addr = inet_addr(server_ip);
hp = gethostbyaddr((char *)&addr,4,AF_INET);
if (hp == NULL)
printf("Cannont resolve address [%s]: Error %d",server_ip,WSAGetLastError());
and when I run it, I get the error
Cannot resolve address [22.214.171.124]: Error 11004
Why is that ? why does it try to resolve the address ?
Do I need DNS here ? and is so, WHY ???