lipp / lua-websockets

Websockets for Lua.
http://lipp.github.com/lua-websockets/
MIT License
399 stars 114 forks source link

Server Poll support (No Copas/No Ev) #30

Closed Someguynamedpie closed 9 years ago

Someguynamedpie commented 10 years ago

You use ev and copas, but no pure lua based system that would let me call a function to check for updates( async). This makes this unusable for me, because otherwise it blocks Lua.

lipp commented 10 years ago

The ev and copas backends are pretty async :) Anyhow, as I understand you, you need a non-blocking sync interface with polling support. How should the interface look like? Do you need a server or a client? Can you go into detail what "pure" Lua means to you. E.g. luasocket is a C Lua module and without luasocket it gets VERY tricky. I guess and hope that if luaosocket is available, copas is available too.

Someguynamedpie commented 10 years ago

I don't mean not use Luasocket. By pure Lua I mean without ev/copas. Something we can call :poll() on and have it check for events. It should settimeout( 0 ) the sockets.

lipp commented 10 years ago

Sorry, for being late! This would require _SOME_ work. For clients only, this might be not too hard. PR welcome :)

lipp commented 9 years ago

@Someguynamedpie Can I close this?

Someguynamedpie commented 9 years ago

Oh didn't see your last reply haha. If I can I'll try to make a pull request.