whoami1337 8aa52e5a0a typo readme | 1 vuosi sitten | |
---|---|---|
.gitignore | 1 vuosi sitten | |
README.md | 1 vuosi sitten | |
main.lua | 1 vuosi sitten | |
websocket.lua | 1 vuosi sitten |
local WebSocketClient = require('websocket')
local copas = require "copas"
local client = WebSocketClient.new({
uri = "http://localhost:3000",
})
-- .... code here
copas.loop()
on_connected -> callback of connected init
on_disconnected -> callback of disconnected
on_received(data) -> callback of recevied messages from ws server
function WebSocketClient:send(command, data)
command -> string,
data -> any