LUA Script - web socket communication

旧街凉风 提交于 2019-12-04 06:13:37

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!