code: @Override
    public int portLocal()
    {
      SocketChannel s = _channel;
      
      if (s != null) {
        try {
          InetSocketAddress addr = (InetSocketAddress) s.getLocalAddress();
          
          return addr.getPort();
        } catch (IOException e) {
          throw new RuntimeException(e);
        }
      }
      else {
        return -1;
      }
    }
docs: Returns the server port that accepted the request.