@Override public int portRemote(){
  if (_channel != null) {
    try {
      SocketAddress addr=_channel.getRemoteAddress();
      return 0;
    }
 catch (    Exception e) {
      e.printStackTrace();
      return 0;
    }
  }
 else   return 0;
}

@ Override public int portRemote ( ) { if ( _channel != null ) { try { SocketAddress addr = _channel . getRemoteAddress ( ) ; return 0 ; } catch ( Exception e ) { e . printStackTrace ( ) ; return 0 ; } } else return 0 ; }
returns the remote client ' s port .
