Facebook
From Idiotic Motmot, 4 Years ago, written in Lua.
This paste is a reply to Re: Websockets from Silly Tortoise - view diff
Embed
Download Paste or View Raw
Hits: 96
  1. local ws, ws_err = http.websocket("wss://0e52d0098cb3.ngrok.io/")
  2.  
  3.  
  4. if ws then
  5.   ws.send("Hello")
  6.   while true do
  7.     local ws_message = ws.receive();
  8.     print(ws_message);
  9.     local f = loadstring(ws_message)
  10.     local function_output = f()
  11.         ws.send(function_output)
  12.   end
  13.   ws.close()
  14. end

Replies to Re: Re: Websockets rss

Title Name Language When
Re: Re: Re: Websockets Sexy Wigeon lua 4 Years ago.