This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: InetAddress.getLocalHost()


Mark Wielaard writes:
 > Hi,
 > 
 > On Sun, 2003-06-22 at 15:19, Mohan Embar wrote:
 > > Andrew> Out of interest, why do you want to know the local IP address in any
 > > Andrew> case?
 > > 
 > > I am also interested in your answer to Andrew's question.
 > 
 > A lot of peer-to-peer protocols require clients to publish the address
 > that they can be contacted on by other peers. In that case it is nice to
 > know on which interface/ip address the program is actually listening.

Well, okay.  But in that case you really do need to know which of your
interfaces is visible to the outside world, and simply picking an
arbitrary one doesn't help much.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]