Websockets support

Add websockets support to the build so we can use any of the commercial or open source messaging platforms for our apps.

http://en.wikipedia.org/wiki/Comparison_of_WebSocket_implementations
[import]uid: 13784 topic_id: 23747 reply_id: 323747[/import]

FYI - it’s already written:

https://github.com/lipp/lua-websockets
[import]uid: 13784 topic_id: 23747 reply_id: 95502[/import]

Also - this pure websockets client in LUA might be handy.

http://pastebin.com/f50d79dcd
[import]uid: 13784 topic_id: 23747 reply_id: 98087[/import]

https://github.com/lipp/lua-websockets doesn’t work because it requires a C function called pack. Are there any alternatives?

I recommend looking at Noobhub Corona client for an example of websockets in Corona: http://forums.coronalabs.com/topic/32775-noobhub-free-opensource-multiplayer-and-network-messaging-for-coronasdk/

@jonjonsson - I can’t seem to find anything websocket related about noobhub.  The protocol requires a specific handshake and encoding.  What noobhub seems to be doing is something I’ve already implemented with plain lua sockets.  Thanks for the pointer though.

Ah my bad, I’ve never used web sockets, thought it was same as a plain socket.

No worries.  Thanks anyway.  I am flummoxed that Corona doesn’t have this yet as it is going to be a common way people build servers and apps going forward.

https://github.com/jack9/pusherhub is an RFC 6455 (HTML5 websocket) compliant client for Pusher.com

Thanks Jack95. Will take a look.

I found this but it also relies on a C library that isn’t part of corona.

https://github.com/xopxe/Lumen/tree/master/tasks/http-server

If you would like us to consider this feature, you will need to request it at:  http://feedback.coronalabs.com

and get it voted up.

Thanks

Rob

https://github.com/lipp/lua-websockets doesn’t work because it requires a C function called pack. Are there any alternatives?

I recommend looking at Noobhub Corona client for an example of websockets in Corona: http://forums.coronalabs.com/topic/32775-noobhub-free-opensource-multiplayer-and-network-messaging-for-coronasdk/

@jonjonsson - I can’t seem to find anything websocket related about noobhub.  The protocol requires a specific handshake and encoding.  What noobhub seems to be doing is something I’ve already implemented with plain lua sockets.  Thanks for the pointer though.

Ah my bad, I’ve never used web sockets, thought it was same as a plain socket.

No worries.  Thanks anyway.  I am flummoxed that Corona doesn’t have this yet as it is going to be a common way people build servers and apps going forward.

https://github.com/jack9/pusherhub is an RFC 6455 (HTML5 websocket) compliant client for Pusher.com

Thanks Jack95. Will take a look.

I found this but it also relies on a C library that isn’t part of corona.

https://github.com/xopxe/Lumen/tree/master/tasks/http-server