lua-users home
lua-l archive

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


Very nice Javier!

I also have been working on a lua httpd!

Mine lacks the elegance of yours, but I'm trying to implement mine
strictly with coroutines, where a socket send or receive will yield
the thread to a scheduler that's heart is a select statement (blocking
on the very sends/receives in each thread).

Lua scripts started from the server would be sandboxed to prevent
crashing/hanging where possible, and provided a send() and receive()
function that "plays nice" with the scheduler.

My code is monsterously nasty right now, but I'm hoping I can borrow
(steal) some ideas in your code and release it when it looks better.

Let me know your thoughts...

Blessings!
-joe


On Tue, 11 Jan 2005 18:10:44 -0500, Javier Guerra <javier@guerrag.com> wrote:
> 
> hi
> 
> i've finally found some time to write, and here is the first result: a very
> very minimal http server written in Lua.  it's up there in LuaForge (no docs
> yet, sorry)
> 
> it uses LuaThreads and LuaSockets, and should be very easy to write handler
> functions and register them with URLs
> 
> of course, i want to write handlers for static files and CGILua pages (it's
> written thinking in the CGILua SAPI)
> 
> --
> Javier
> 
> 
> 


-- 
Person who say it cannot be done should not interrupt person doing it.
 -- Old Scottish Proverb