Closed birbe closed 7 years ago
See #107:
CCTweaks currently provided a TCP socket system (modelled off OpenComputer's version). I've had a look at the WebSocket spec and it doesn't look too hard to implement - it is built on top of TCP. I might have a go myself.
More importantly the second paragraph:
My general approach is to not add a feature unless it is impossible or very impractical to implement Lua. WebSockets fall into this category.
WebSockets would be a great addition. You can do everything in real-time, and you could even connect to a Discord server if you're that ambitious. There's already an open-source library for WebSockets in Java, so it shouldn't be too difficult. I think what the end result should look like is:
ws = os.loadAPI("websockets") ws.connect("ws://...") wsEvent,packet = os.pullEvent("wsreceive") ws.emit("blah",{table})