interface CloudflareWebSocketHost
Since 0.2.0

Injectable seam covering the two Workers-only globals this upgrader needs.

Methods

Creates a linked client/server socket pair.

createUpgradeResponse(
client: unknown,
protocol?: string
): Response

Builds the 101 response that hands the client half back to the peer.

Usage

import { type CloudflareWebSocketHost } from "runtime/src/index.ts";