WebSocket
The WebSocket class provides a simple interface for sending and receiving data over a WebSocket connection.
WebSocket.connect
function WebSocket.connect(url: string): WebSocketParameters
Example
local ws = WebSocket.connect("ws://localhost:8080")
ws.OnMessage:Connect(function(message)
print(message)
end)
ws.OnClose:Connect(function()
print("Closed")
end)
ws:Send("Hello, World!")WebSocket
Methods
Method
Description
Events
Event
Description
Last updated