Module

x/hono/utils/stream.ts>StreamingApi

Web Framework built on Web Standards
Very Popular
Go to Latest
class StreamingApi
import { StreamingApi } from "https://dotland.deno.dev/x/hono@v4.2.6/utils/stream.ts";

Constructors

new
StreamingApi(writable: WritableStream, _readable: ReadableStream)

Properties

private
abortSubscribers: (() => void | Promise<void>)[]
private
encoder: TextEncoder
private
writable: WritableStream
private
writer: WritableStreamDefaultWriter<Uint8Array>
responseReadable: ReadableStream

Methods

onAbort(listener: () => void | Promise<void>)
pipe(body: ReadableStream)
sleep(ms: number)
write(input: Uint8Array | string)
writeln(input: string)