Setu-TS
    Preparing search index...

    Function createDefaultDurableObjectWebSocketHost

    • Builds the default host from the real Workers global.

      Exported as a factory rather than a constant so the boundary cast runs only when an upgrade happens — importing this module on Deno must not throw — and so a unit test can drive the default path directly.

      Returns DurableObjectWebSocketHost

      A host backed by the WebSocketPair global

      When WebSocketPair is absent, i.e. off the Workers runtime, or when the global yields an incomplete pair

      // Inside the Durable Object class the application exports:
      const core = new RealtimeBackplaneObjectCore(this.ctx, {
      createPair: createDefaultDurableObjectWebSocketHost(),
      });

      0.2.0