Skip to main content

Arguments

WebSocket
required
WebSocket table returned by WebSocket.connect. Send is resolved from the WebSocket object methods, so the documented call form is socket:Send(..).
string
required
Lua string payload passed to curl_ws_send with its explicit byte length.
boolean
When this argument is present and true, Send uses CURLWS_BINARY. Otherwise it uses CURLWS_TEXT.

Example

Send text or binary data through a WebSocket object returned by WebSocket.connect.