Posted 18 December 2016 - 06:59 AM
This would make real-time internet communication possible with CC.
There's already an open-source library for WebSockets in Java, so it wouldn't be amazingly difficult.
This would make CC more fun and practical to use. What I think it should look like:
This was suggested a couple years ago and didn't get much attention.
"data" would either be an array or string. You'd need to decode arrays that are sent first, but that shouldn't be difficult.
There's already an open-source library for WebSockets in Java, so it wouldn't be amazingly difficult.
This would make CC more fun and practical to use. What I think it should look like:
ws = os.loadAPI("websockets")
socket = ws.connect("ws://PlaceThatProvidesAWebSocket")
emittedEvent,data = os.pullEvent("wsreceive")
socket.emit("eventName",{packet1 = "noice"})
This was suggested a couple years ago and didn't get much attention.
"data" would either be an array or string. You'd need to decode arrays that are sent first, but that shouldn't be difficult.
Edited on 18 December 2016 - 06:00 AM