method WebSocketConnection.prototype.send
WebSocketConnection.prototype.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 { WebSocketConnection } from "websocket-plugin/src/index.ts";