[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LibHTTPD?
- From: PA <petite.abeille@...>
- Date: Sat, 12 Feb 2005 10:27:23 +0100
On Feb 11, 2005, at 13:35, Luiz Henrique de Figueiredo wrote:
LibHTTPD seems nice and simple to bind to Lua.
Yes, it looks that way. Plus, one can simply register a C function to
handle the content generation for a given URL pattern:
But I wonder whether it'd be better to have as much of it in Lua.
Well, Lua itself doesn't do sockets. So you could think of LibHTTPD as
a more specialize version of LuaSocket. In other words, LibHTTPD takes
care of the server side socket and the concurrent dispatching of
requests and responses. Lua can then be solely used to generate the
dynamic content itself without worrying too much about concurrency as
this is taken care of by the embedding LibHTTPD library. Another side
effect of using LibHTTPD is that any static content can be handled by
that library directly as well. One less thing to do :)
PA, Onnay Equitursay