I am attempting to reverse engineer a web socket library in for Corona SDK. I am not very familiar with networking, which I think is my problem. Are there any good tutorials that can help me understand how web sockets work in Javascript and how I can make something analogous in Lua?
The difficulty is in the encoding which is easy to do in C or C++ but very difficult in Lua. There are partial Lua solutions but they all use C++ underneath. For example here: https://github.com/lipp/lua-websockets
I haven’t found a complete solution so my own project is completely stuck.
I am really new to Conrona SDK but very experienced in software development (30+ years). My focus has always been user interfaces for educational purposes so I have largely left the networking to others.
I’ve got Lua talking to a UDP server, which is nice and quick. Is Lua is really c, c++ underneath? Would it make more sense to call c library for this anyway? Do you think it would be possible to make a deal with Corona Labs to develop this functionality?
The difficulty is in the encoding which is easy to do in C or C++ but very difficult in Lua. There are partial Lua solutions but they all use C++ underneath. For example here: https://github.com/lipp/lua-websockets
I haven’t found a complete solution so my own project is completely stuck.
I am really new to Conrona SDK but very experienced in software development (30+ years). My focus has always been user interfaces for educational purposes so I have largely left the networking to others.
I’ve got Lua talking to a UDP server, which is nice and quick. Is Lua is really c, c++ underneath? Would it make more sense to call c library for this anyway? Do you think it would be possible to make a deal with Corona Labs to develop this functionality?
Thanks Jack. I’ll take a look at your implementation. We’ve gone in another direction for the moment, but I would like to revisit this later. As I began to dig into it I came to the conclusion it could be done. It is nice to see an actual implementation. I’m sure that will be very helpful.
May be back to this topic later. Hopefully others will find this post.
Thanks Jack. I’ll take a look at your implementation. We’ve gone in another direction for the moment, but I would like to revisit this later. As I began to dig into it I came to the conclusion it could be done. It is nice to see an actual implementation. I’m sure that will be very helpful.
May be back to this topic later. Hopefully others will find this post.
as a quick test, i just ran the example ‘echo’ from both github repos – dmc-websockets and dmc-corona-library (branch 2.0) – on the Mac Sim and everything worked fine.
(btw, branch 2.0 of dmc-corona-lib is same as dmc-websocket repo)
things to check
* if you’re using dmc-corona-lib repo, make sure you have 2.0 branch – ‘dmc_corona-2.x’
* ensure the search PATH in dmc_corona.cfg is correct according to your setup
otherwise i need more info:
* running on ? sim (mac/win), device (iOS/android)
* repo where you got code ? have a fresh checkout, or is it updated ?
* what example are you using to test – echo, pusher, autobahn ?
as a quick test, i just ran the example ‘echo’ from both github repos – dmc-websockets and dmc-corona-library (branch 2.0) – on the Mac Sim and everything worked fine.
(btw, branch 2.0 of dmc-corona-lib is same as dmc-websocket repo)
things to check
* if you’re using dmc-corona-lib repo, make sure you have 2.0 branch – ‘dmc_corona-2.x’
* ensure the search PATH in dmc_corona.cfg is correct according to your setup
otherwise i need more info:
* running on ? sim (mac/win), device (iOS/android)
* repo where you got code ? have a fresh checkout, or is it updated ?
* what example are you using to test – echo, pusher, autobahn ?