Hi every one,
I want to use gideros to build online game server. After searching the forum, i found code example of tcp / udp protocol, but our current server is writing in nodejs with websocket protocol, so with mobile build, html 5 build, that would be great if gideros has websocket api (So developer will user the same code base on client)
is there anybody are developing pure lua code or plugin for websocket in gideros? If not, can we build websocket plugin from c/c++ lib?
Thank so much!
Comments
Basically what needed to be rewritten is the loop when checking for messages, etc. Like using timers in Gideros, instead of ev or copas
But since you need a client, then I think you can also try using their synchronous client, which does not depend on third party loops.
And if that works, you can try modiyfing client_sync.lua by adding Gideros events and Timers loop too
https://github.com/lipp/lua-websockets
And for writing websocket plugin, would you please list some native c++ websocket libs that can convert into gideros plugin?
Thank so much!
It was easier to find lua socket based, as the one I provided,
And yes sync will block a ui till message received, etc. But I think with lua knowledge it should be easy to settimeout 0 and implement periodic listening with Gideros Timers, but have not tried.