method IDurableObjectState.getWebSockets
IDurableObjectState.getWebSockets(): IDurableObjectWebSocket[]

Returns every currently connected socket.

Survives hibernation, which is what makes it usable as the sole source of truth for broadcast membership.

Return Type

The connected sockets

Usage

import { type IDurableObjectState } from "cloudflare-plugin/src/index.ts";