• Post Reply Bookmark Topic Watch Topic
  • New Topic

URL Query??  RSS feed

 
Ravi Verma
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dudes !!!
I have a quetion in the URL Objects we typically use like this
URL u = new URL("http://192.168.1.4:6767");
in this 192.168.1.4 is the TargetURL or the URL to which i should connect. How to know or set the IP from this connection is made. In the sense i have two IP Address on my machine(Two network cards). My question is from which IP address the Request is made?? and is there any way to set the IP Address from it should make a request.
NOTE: For Sockets we can set this but URL???
Response is Grately appreciated

Thanks
 
Michael Zalewski
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A URL is like a File. It doesn't need a network, and you can make a URL without ever opening a connection or checking to see if the connection exists.
When you open the URL, how the IP address gets sent to the other end depends on the protocol. Some URL protocols like file: don't have a remote connection. Others like http: have special protocols that you can use to set the requesting address.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!