问题
I am working with between Linux-based machine and android app.
First of all, I need to open a server socket on the machine to communicate with the app.
I need to code with LUA Script, and I have no idea with it..
Could you please give me some exmaple to open a server socket and receive the message from android app?
thank you.
回答1:
If you are looking for websocket support in Lua, try lua-websockets.
For regular sockets, you can use luasocket; the introduction page includes an echo server example working over TCP; this SO answer includes a client example.
来源:https://stackoverflow.com/questions/16897557/lua-script-web-socket-communication