regarding gethostbyname()


 
Thread Tools Search this Thread
Top Forums Programming regarding gethostbyname()
# 1  
Old 02-01-2007
regarding gethostbyname()

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
sree
# 2  
Old 02-01-2007
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.
# 3  
Old 02-01-2007
You have already asked this question in another thread and the rules prohibit duplicate posts.
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. IP Networking

The system function gethostbyname() failed to find the client's host name

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)
Discussion started by: jinslick25
1 Replies

2. Windows & DOS: Issues & Discussions

gethostbyname failed

gethostbyname is failing and returning NULL on Windows 7. Should i use inet_addr or there is other way to get it (3 Replies)
Discussion started by: Saurabh78
3 Replies
Login or Register to Ask a Question