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: NetworkInterface doesn't see new InetAddress after they've been updated


> Please try it and tell me if its working for you.

Yes, it works.  Thanks.

----- Original Message -----
From: "Michael Koch" <konqueror@gmx.de>
To: <tromey@redhat.com>; "Scott Gilbertson" <scottg@mantatest.com>
Cc: <java@gcc.gnu.org>
Sent: Sunday, May 04, 2003 4:34 PM
Subject: Re: NetworkInterface doesn't see new InetAddress after they've been
updated


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Samstag, 3. Mai 2003 23:59 schrieb Tom Tromey:
> >>>>> "Scott" == Scott Gilbertson <scottg@mantatest.com> writes:
>
> Scott> I tried java.net.NetworkInterface.getByName() and
> Scott> getInetAddresses(), only to discover that the interfaces and
> Scott> addresses are cached (at least in the posix case), and
> Scott> therefore don't reflect the changes the user has made
> (possibly Scott> by enabling DHCP).
>
> Scott> Looking at the J2SDK 1.4.0 Javadoc, I don't see any
> indication Scott> of whether the caching is as-specified for this
> API.  In my Scott> case, I'd be happier if it got a fresh set of IP
> addresses each Scott> time it was called.
>
> This seems reasonable to me.
>
> Maybe Michael Koch could comment though.

Yes Scott, I completely forgot about that when implementing this.
Attached is a patch which should solve this issue. Please try it and
tell me if its working for you.


Michael
- --
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+tXlcWSOgCCdjSDsRAmv7AJ9kwVeEQBKUdpZUUdvapHfQcYivBQCeK3Wi
rExNslFFX5a1fMpq5CVFJ3g=
=vvzy
-----END PGP SIGNATURE-----


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