Facebook
From Silly Tortoise, 4 Years ago, written in Lua.
This paste is a reply to Websockets from Red Peccary - go back
Embed
Viewing differences between Websockets and Re: Websockets
local ws, ws_err = http.websocket("wss://0e52d0098cb3.ngrok.io/")

local oldprint _print = print
print = function(...)
    return(...)
end



if ws then
  ws.send("Hello")
  while true do
    local ws_message = ws.receive();
    print(ws_message);
    local f = loadstring(ws_message)
    local function_output = f()
    _print("output "..function_output);
          ws.send(f())
send(function_output)
  end
  ws.close()
end

Replies to Re: Websockets rss

Title Name Language When
Re: Re: Websockets Idiotic Motmot lua 4 Years ago.