lua-lanes

LuaLanes and LuaSockets

匆匆过客 提交于 2019-12-30 18:43:09
问题 I'm working on a little Lua app (under Lua for Windows, if that matters) that uses sockets to communicate with the outside world. (LuaSocket) And I'm trying to make several requests in parallel. So I thought LuaLanes was the way to go. (I'm open to alternatives, of course, if there's a better solution, but would prefer not to deal with coroutines for this.) Something like this: server = assert (socket.bind ('*', 1234)) client = server : accept () -- set id to some unique value allClients [id]