Bug in getInetAddress from Socket?

Kees Huizing keesh at win.tue.nl
Mon May 24 14:30:23 PDT 1999


It seems that getInetAddress() gets the wrong address. See the following code
fragment (ss is a ServerSocket):

Socket s = ss.accept();
System.out.println("Got a connection from location: " + s.getInetAddress());

On JDK/Solaris, I get the address (name and number) of the remote host,
the one that opened the Socket, whereas on Kaffe/Linux, I get the
address of the local host, i.e., the one that created the ServerSocket,
the one where this code is running.

Am I doing something wrong here, or is this a (known) Kaffe bug?

Kees Huizing

-- 
Kees Huizing - keesh at win.tue.nl - Dept. of Mathematics and Computer Science 
Eindhoven University of Technology - The Netherlands * FREE SPEECH ON-LINE
tel:+31-40-2474120 -  fax:+31-40-2468505 - http://www.win.tue.nl/~keesh


More information about the kaffe mailing list