WebSocket.connect
Opens a WebSocket connection. The returned object exposes Send and Close plus the OnMessage and OnClose signals.
Signature
WebSocket.connect(url: string): WebSocketParameters
urlstringA ws:// or wss:// endpoint.
Returns
WebSocket
Example
local socket = WebSocket.connect("ws://localhost:8080")
socket.OnMessage:Connect(function(message)
print("received", message)
end)
socket:Send("hello")