MsendText
Bun

method

ServerWebSocket.sendText

data: string,
compress?: boolean
): number;

Sends a text message to the client.

@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);