This is the mail archive of the java-discuss@sourceware.cygnus.com 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]

InetAddress bug?


Hello,

I am trying to get the host address from both a Socket and a ServerSocket as
follows:

String address = someSocket.getInetAddress().getHostAddress();

this always returns a null.

I am initialising the ServerSocket with the ServerSocket(porNumber) constructor
and the other socket comes from an accept call on the server socket 

Is this invalid code or a bug?

Regards

Lincoln
--
------------------------------------------------------------------------------

Lincoln Spiteri

Manufacturing Systems
STMicroelectronics, Malta

e-mail: lincoln.spiteri@st.com

------------------------------------------------------------------------------

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