0

I am reading about computer networks. I saw some simple HTTP socket programs(In c gcc). I saw a strange thins on those programs they are using URL directly without any DNS lookup. How this thing works? are dns lookup's implemented by builtin library functions?or else the application programmer need not to worry about DNS someone else may be the isp do it for the programmer?

1
  • Depends on the OS, libraries, and actual code. (you've provided none of those, btw.) Some systems can operate on a URL.
    – Ricky
    Commented Aug 23, 2015 at 20:58

1 Answer 1

0

Yes. Most libraries for network requests do an implicit get_host_by_name (which is the libc function) or similar function for retrieving the IP address. This means that you ask your operating system for the IP. It will then use the internal DNS software to retrieve the address.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.