/** * io/broker.ts * * The I/O broker: runs in its own worker (spawned from the same worker.js * via an 'init-broker' first message — it never loads the WASM). It owns the * block cache shared by every decode worker and serves their synchronous * read requests: requests arrive as port messages, replies for a blocked * worker go exclusively through that worker's SAB channel (data → SEQ → * STATUS last → notify). Backends: HTTP range requests for URLs, File.slice * for local files — both async, parallel, and deduped. */ import type { IoConfig } from './protocol.js'; export declare class IoBroker { private readonly config; private readonly store; private files; private statInflight; constructor(config: IoConfig); /** Wire one decode worker's channel (its MessagePort + SAB). */ attachChannel(port: MessagePort, sab: SharedArrayBuffer): void; private onRequest; private handleRead; private handleRegisterUrl; /** * Determine a remote file's size. Servers without range support get the * legacy createLazyFile treatment: the whole body is downloaded once and * served from memory. */ private statUrl; private fetchRange; } //# sourceMappingURL=broker.d.ts.map