diff options
-rw-r--r-- | shop.lua | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -4,8 +4,10 @@ assert(sres.ok,"not ok") ws = assert(http.websocket(sres.url)) while true do - c=textutils.unserializeJSON(assert((ws.receive()))) + msgtxt = assert(ws.receive(),"ws error") + msg = textutils.unserializeJSON(msgtxt) print(c.type) + if c.type ~= "keepalive" then print(msgtxt) end end |