lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi, list!

Any clues on Lua web framework that would allow HTTP long polling [1]?

I need to write a HTTP server that dispatches events to clients.

1. Clients connect to server (with their ID in request parameters) and
wait for event. If connection timeouts, clients reconnect.

2. Server blocks on a certain get_events() function, which returns a
list of <client-id, event-data> pairs. If client-id client is
connected, server sends it the event-data and closes connection. (If
client-id is not connected at the moment, bad luck, data is lost.)

Looks like it is not possible to do this in WSAPI without some serious
low-level coding...

Thanks,
Alexander.

[1] — http://en.wikipedia.org/wiki/Long_polling#Long_polling