Пример #1
0
  /**
   * Checks if the given HTTP message should be considered as a last SPDY frame.
   *
   * @param httpMessage check this HTTP message
   * @return whether the given HTTP message should generate a <em>last</em> SPDY frame.
   */
  private static boolean isLast(HttpMessage httpMessage) {
    if (httpMessage instanceof FullHttpMessage) {
      FullHttpMessage fullMessage = (FullHttpMessage) httpMessage;
      if (fullMessage.trailingHeaders().isEmpty() && !fullMessage.content().isReadable()) {
        return true;
      }
    }

    return false;
  }