httpSendStream(request, response, httpStream, message) {
    const streamSizeFixed =
      typeof httpStream.totalBytes === "number" && httpStream.totalBytes > 0;

    if (httpStream.errored) {
      this.httpSendError(
        message,
        response,
        kerror.get(
          "network",
          "http",
          "stream_errored",
          httpStream.error.message,
        ),
      );
      return;
    }

    if (httpStream.destroyed) {
      this.httpSendError(
        message,
        response,
        kerror.get("network", "http", "stream_closed"),
      );
      return;
    }

    // Remove Content-Length header to avoid conflic with Transfer-Encoding header
    request.response.setHeader("Content-Length", null);

    // Send Headers in one go
    response.cork(() => {
      this.httpWriteRequestHeaders(request, response, message);
    });

    httpStream.stream.on("data", (chunk) => {
      // Make a copy of the array buffer
      const arrayBuffer = chunk.buffer.slice(
        chunk.byteOffset,
        chunk.byteOffset + chunk.byteLength,
      );

      const arrayBufferOffset = response.getWriteOffset();

      let backpressure = false;

      /**
       * Switch method of writing data to the response
       * based on the size of the stream.
       * If the stream has a fixed size we can use the tryEnd method
       */
      if (streamSizeFixed) {
        const [success, done] = response.tryEnd(
          arrayBuffer,
          httpStream.totalBytes,
        );
        backpressure = !success;

        if (done) {
          httpStream.destroy();
          return;
        }
      } else {
        const success = response.write(arrayBuffer);

        backpressure = !success;
      }

      // In case of backpressure we need to wait for drainage before sending more data
      if (backpressure) {
        response.arrayBufferOffset = arrayBufferOffset;
        response.arrayBuffer = arrayBuffer;
        httpStream.stream.pause();

        /**
         * When the stream is drained we can resume sending data,
         * only if the is no backpressure after we wrote the missing chunk data.
         */
        response.onWritable((offset) => {
          if (!streamSizeFixed && offset - response.arrayBufferOffset === 0) {
            httpStream.stream.resume();
            return true;
          }

          let retryBackpressure = false;
          const remainingChunkData = response.arrayBuffer.slice(
            offset - response.arrayBufferOffset,
          );

          if (streamSizeFixed) {
            const [success] = response.tryEnd(
              remainingChunkData,
              httpStream.totalBytes,
            );

            retryBackpressure = !success;
          } else {
            const success = response.write(remainingChunkData);

            retryBackpressure = !success;
          }

          if (!retryBackpressure) {
            httpStream.stream.resume();
          }

          return !retryBackpressure;
        });
      }
    });

    httpStream.stream.on("end", () => {
      if (httpStream.destroy()) {
        response.end();
      }
    });

    httpStream.stream.on("close", () => {
      if (httpStream.destroy()) {
        response.end();
      }
    });

    httpStream.stream.on("error", (err) => {
      if (httpStream.destroy()) {
        response.end();
      }

      debugHTTP(
        "[%s] httpSendStream: %s",
        httpStream.connection.id,
        err.message,
      );
    });

    response.onAborted(() => {
      httpStream.destroy();
    });
  }
Send stream data thorugh the HTTP response
@param {HttpRequest} request
@param {HttpStream} httpStream - The data stream to send
@param {uWS.HttpResponse} response
@param {HttpMessage} message