[]previous and next page

WebSocketHandle

The reactive view of a WebSocket: the last message, the status, and send.

The reactive view of a WebSocket: the last message, the status, and send.

Import#

ts
import type { WebSocketHandle } from "@shadow-js/dusk/client";

Signature#

ts
interface WebSocketHandle<T> extends StreamHandle<T | ArrayBuffer> {
  /** Sends a message. False when the socket is not open. */
  send(data: string | BufferSource): boolean;
}

Members#

Name Type Description
T T
send send(data: string | BufferSource): boolean Sends a message. False when the socket is not open.