All the socket classes should have methods to mirror the connect() & bind()
method and returning a SocketAddress object. Right now, the getInetAdress(),
getLocalAddress(), getLocalPort() & getPort() are not only a bit confusing but
inconsistent with connect() & bind() which both take SocketAddresses as
parameters.
This will provide a much needed abstraction in particular for java.nio.
method and returning a SocketAddress object. Right now, the getInetAdress(),
getLocalAddress(), getLocalPort() & getPort() are not only a bit confusing but
inconsistent with connect() & bind() which both take SocketAddresses as
parameters.
This will provide a much needed abstraction in particular for java.nio.