public int getPort() {
        return socket.getPort();
    }
Returns the port that the connection uses.

@return the port that the connection uses.
xmppserver/src/main/java/org/jivesoftware/openfire/net/SocketConnection.java