Question about native 1.4.1, InetAddress.getLocalHost() - bug?
Jan.Grant at bristol.ac.uk
Wed Apr 9 10:36:43 PDT 2003
Should this do what I think it should? When I created a ServerSocket
s = new ServerSocket(1234, 0, InetAddress.getLocalHost());
I wound up with netstat reporting that I had a TCP connection listening
on 192.168.0.1.1234. From the description of the call, I'd expect
to see it listening on 127.0.0.1.1234.
s = new ServerSocket(1234, 0, InetAddress.getByName("localhost"));
demonstrates the behaviour I'd expect from the first call.
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
"...perl has been dead for more than 4 years." - Abigail in the Monastery
More information about the freebsd-java