Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

URL to IP  RSS feed

 
Drew Lane
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey There!
I am wondering how URL's get resolved to IP addresses using Java.net
For example:
InetAddress.getByName(theHost).getAddress();
Where "theHost" is a String.
I can see when I call this method that there is Internet activity to get the IP address, but where / how does this occur?
Is this a DNS feature?
Thanks!
Drew
 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know for sure, but I'd imagine it would get resolved by a DNS server.

- Sean
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>> Is this a DNS feature?
Certainly. The host name gets resolved by a "A" query to the DNS system and cached locally.
Yours
- Lars
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!