I'm newbie in Lua, but have an experience in PHP. I have a project on PHP which is a demon that receives data from one socket and distributes data to connected clients via websocket. The project is pure PHP, without third-party libraries. I want to replicate the project in Lua.
However, I have not found good examples of working with sockets on Lua.
How can I serve two sockets at the same time? How do I get multiple incoming connections on the same port?
It's easy on PHP, but I don't understand at all how to do it on Lua. I would be grateful for pointers to documentation and good examples how to do it on Lua.