method IWebSocketConnection.send
IWebSocketConnection.send(data: string | Uint8Array): void

Sends a frame to this peer.

Parameters

data: string | Uint8Array

Text as string, binary as Uint8Array

Return Type

void

Throws

Error

If the connection is no longer open

Usage

import { type IWebSocketConnection } from "common/src/index.ts";