Syntax
WebSocket.Send(socket: WebSocket, message: string, isBinary?: boolean)Arguments
| Name | Type | Description |
|---|---|---|
socket | WebSocket | Open WebSocket handle returned by WebSocket.connect. |
message | string | Text or binary payload to send through the socket. |
isBinary? | boolean | When true, sends the payload as binary data; otherwise sends a text message. |
Description
Sends text or binary data through an open WebSocket connection.
Call it with 3 parameter(s): socket, message, isBinary. The argument table explains which values are required and which ones only refine the behavior.
It does not return data. Treat the call as an action and handle errors around the call site when needed.
Example
Example call with placeholder values.
WebSocket.Send(nil, "example", true)