Posted on 2001-09-10
I have the following code :
char server_ip = "188.8.131.52";
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 [184.108.40.206]: Error 11004
Why is that ? why does it try to resolve the address ?
Do I need DNS here ? and is so, WHY ???