code: public static String getRemoteAddress(Channel channel) {
      if (channel != null && channel.remoteAddress() != null) {
        return channel.remoteAddress().toString();
      }
      return "<unknown remote>";
    }
docs: Returns the remote address on the channel or "&lt;unknown remote&gt;" if none exists.