Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Apr 2003 18:36:16 +0100 (BST)
From:      Jan Grant <Jan.Grant@bristol.ac.uk>
To:        freebsd-java@freebsd.org
Subject:   Question about native 1.4.1, InetAddress.getLocalHost() - bug?
Message-ID:  <Pine.GSO.4.44.0304091833200.7708-100000@mail.ilrt.bris.ac.uk>

next in thread | raw e-mail | index | archive | help

Should this do what I think it should? When I created a ServerSocket
using

	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.

Using
	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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.44.0304091833200.7708-100000>