|
Have a look on getInetAddress() method of Socket class, which returns a reference to InetAddress class , and getHostAddress() method of InetAddress class which returns a textual representation of IP address of the remote machine to which the socket is connected.
|