iam using gethostbyname for verifing whether net is active or not
it's work fine
but how it's work
i mean whether it is using ping or sending socket,
who it determining the internet .
thank u in advance
If you mean it's checking whether your internet connection in general is working, that works because to look up most hostnames, it has to communicate with a DNS server over the internet. No internet, no name lookup. There are exceptions, of course. Entries in /etc/hosts get looked up from the file without asking a DNS server at all.
As we are facing issue with this server connection. The error is:
The system function gethostbyname() failed to find the client's host name.
how can i check if the server "server1" is able to resolve the client hostname (hosts / dns)?
i can ping the client from server.
any... (1 Reply)