whoami1337 69e32287f9 init | 1 سال پیش | |
---|---|---|
.gitignore | 1 سال پیش | |
README.md | 1 سال پیش | |
main.lua | 1 سال پیش | |
websocket.lua | 1 سال پیش |
local WebSocketClient = require('websocket')
local copas = require "copas"
local client = WebSocketClient.new({
uri = "http://localhost:3000",
})
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