Setu-TS
    Preparing search index...

    Interface ISseConnection

    A live SSE connection backed by a ReadableStream.

    The connection owns its stream lifecycle (heartbeat interval, controller, abort listener) and exposes send, comment, and close.

    0.1.0

    interface ISseConnection {
        id: string;
        isOpen: boolean;
        lastEventId: string | null;
        result: HandlerResult;
        close(): void;
        comment(text: string): void;
        send(msg: SseMessage): void;
    }

    Implemented by

    Index
    id: string

    Unique connection ID.

    isOpen: boolean

    Whether this connection is still open.

    lastEventId: string | null

    The client's Last-Event-ID header value, if present.

    The HandlerResult obtained from ctx.response.stream(). The handler returns this value so the kernel maps it to the correct web response.

    • Closes the connection: clears the heartbeat, closes the stream controller, and marks the connection as closed. Idempotent.

      Returns void

    • Enqueues a plain-text comment frame (: <text>\n\n) — commonly used as a keep-alive heartbeat.

      Parameters

      • text: string

        The comment text

      Returns void