code: public final ChannelFuture writeHeaders(int id, int streamId, HttpHeaders headers, boolean endStream) {
  
          assert eventLoop().inEventLoop();
  
          if (closed) {
              return newClosedSessionFuture();
          }
  
          return doWriteHeaders(id, streamId, headers, endStream);
      }
docs: Writes an {@link HttpHeaders}.