Setu-TS
    Preparing search index...

    Interface CloudflareWebSocketHost

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

    0.2.0

    interface CloudflareWebSocketHost {
        createPair(): CloudflareWebSocketPair;
        createUpgradeResponse(client: unknown, protocol?: string): Response;
    }
    Index
    • Builds the 101 response that hands the client half back to the peer.

      Parameters

      • client: unknown

        The client half of the pair

      • Optionalprotocol: string

        The negotiated subprotocol to echo, when one was selected

      Returns Response

      The 101 response