I am trying to create a Java NIO based socket server using Apache Mina. I really need to know the port of the remote host, not just the IP address, and it seems that Mina provides only the SocketAddress object (which can be disabled for InetAddress). I can get the IP address from InetAddress, but I usually use Socket.getPort () to get the port number, but Mina seems to be hiding these low level objects. Is there another way? Thanks!
source
share