Setu-TS
    Preparing search index...

    Interface IDurableObjectClientSocket

    The client half of a WebSocketPair, or the socket a Worker gets back from a Durable Object upgrade.

    Distinct from IDurableObjectWebSocket because this side must be accept()ed and listened to, while the DO side is accepted by the runtime through state.acceptWebSocket and never listened to directly.

    0.2.0

    interface IDurableObjectClientSocket {
        accept(): void;
        addEventListener(
            type: "error" | "close" | "message",
            listener: (event: DurableObjectMessageEvent) => void,
        ): void;
        close(code?: number, reason?: string): void;
        send(message: string | ArrayBuffer): void;
    }
    Index