web-stream-kit
    Preparing search index...

    Class ServerSentEventEncodeStream

    A TransformStream that encodes ServerSentEvent objects into standard SSE wire strings.

    Each message is delimited with a blank line (\n\n) and multi-line data payloads are split into individual data: lines. // src/text/sse-encode.ts import { ServerSentEvent } from "./sse-types.js";

    /** A TransformStream that encodes ServerSentEvent objects into standard SSE wire strings. Each message is delimited with a blank line (\n\n) and multi-line data payloads are split into individual data: lines.

    const sseWireStream = objectStream
    .pipeThrough(new ServerSentEventEncodeStream())
    .pipeThrough(new TextEncoderStream());

    Hierarchy

    Index
    readable: ReadableStream<string>

    The readable read-only property of the TransformStream interface returns the ReadableStream instance controlled by this TransformStream.

    MDN Reference

    writable: WritableStream<ServerSentEvent>

    The writable read-only property of the TransformStream interface returns the WritableStream instance controlled by this TransformStream.

    MDN Reference