I can磘 get the IP address from InetAddress getHostAddress() method. Why ?
Hi all,
Here is my code:
ssc = ServerSocketChannel.open();
ssc.socket().bind(new InetSocketAddress(4000));
ssc.configureBlocking(false);
When I do:
System.out.println(ssc.socket().getInetAddress().getHostAddress());
It returns: 0.0.0.0
What should I do to obtain IP address from OS correcly ?
Thanks.

