What is the difference between a SocketAddress and an InetAddress in Java… here is a solution to the problem.
What is the difference between a SocketAddress and an InetAddress in Java
It is not clear what SocketAddres is designed to do. As far as I know, there is only one fair way to use it: through InetSocketAddress. It’s confusing.