WebSocketOverview
WebSocket.send
Represents sending a message on a WebSocket connection.
Aliases
WebSocket.SendDetails#
Sends a string through an established WebSocket object using socket:Send. This is an object method, not a second connection operation; sending after closure can fail.
Examples#
Example
local ok, socket = pcall(WebSocket.connect, "ws://127.0.0.1:8081")
if ok then
socket:Send("local echo")
socket:Close()
else
warn(socket)
end