import { type HttpHandler } from "@statewalker/webrun-http-streams"; import type { MessageTarget } from "../core/message-target.js"; /** * Serve an `HttpHandler` over a `MessageTarget`, using this package's own * `handleStreams` transport. * * @deprecated Prefer the port stack in `@statewalker/webrun-rpc`: open a port * (`multiplexPort` over one pipe, or `transferPortMux` where the platform can * transfer a real `MessagePort`), turn it into a `Duplex` with * `serveDuplexOverPort`, and serve HTTP on that with * `httpServe(handler, options)` from `@statewalker/webrun-http-streams`. * * That path has backpressure; **this one does not.** `sendStream`'s chunk * sender discards the promise it is given, so a fast producer over a slow * consumer accumulates without bound. It also has no per-stream timeout and no * chunking to a transport's message ceiling. * * Kept for existing ServiceWorker setups built on the `MessageTarget` surface. */ export declare function handleHttpRequests(communicationPort: MessageTarget, handler: HttpHandler): () => void; /** * Ship a `Request` over a `MessageTarget` and await the `Response`, using this * package's own `sendStream` transport. * * @deprecated Prefer the port stack in `@statewalker/webrun-rpc`: open a port * (`multiplexPort` over one pipe, or `transferPortMux` where the platform can * transfer a real `MessagePort`), turn it into a `Duplex` with * `duplexOverPort`, and drive HTTP over it with `httpFetch` from * `@statewalker/webrun-http-streams`. * * Same caveat as {@link handleHttpRequests}: the transport underneath this * helper has no backpressure, no per-stream timeout, and no chunking to a * transport's message ceiling. Kept for existing ServiceWorker setups. */ export declare function sendHttpRequest(communicationPort: MessageTarget, request: Request): Promise; //# sourceMappingURL=http-send-recieve.d.ts.map