Sends a message to the client.
Symbol
ServerWebSocket.send
@param data
The data to send.
@param compress
Should the data be compressed? If the client does not support compression, this is ignored.
ws.send("Hello!");
ws.send("Compress this.", true);
ws.send(new Uint8Array([1, 2, 3, 4]));
Referenced types
type BufferSource = NodeJS.TypedArray | DataView | ArrayBufferLike