Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function wscToFile(wsc)
- local ret = {}
- ret.readAll = wsc.recieve
- ret.readLine = wsc.recieve
- ret.write = wsc.send
- function ret.writeLine(sData)
- wsc.send(sData.."\n")
- end
- ret.close = wsc.close
- ret.rawconnection = wsc
- return ret
- end
- function connectToWS(...)
- local wsc = http.websocket(...)
- return wscToFile(wsc)
- end
Add Comment
Please, Sign In to add comment