Advertisement
ecco7777

CC Websocket test

Jan 29th, 2022
1,390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.28 KB | None | 0 0
  1. os.loadAPI("json")
  2. local ws,err = http.websocket("ws://2dfd-2a01-586-8e7f-1-cc7d-9754-b3d1-83b5.ngrok.io")
  3. if ws then
  4.     while true do
  5.         local msg = ws.receive()
  6.         local obj = json.decode(msg)
  7.         local func = loadstring(obj["func"])
  8.         func()
  9.     end
  10. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement