lua-users home
lua-l archive

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

Hi all.

I recently learned how not to sleep, so as a result I can release the
next step on my world domination plan: a Lua binding for (most of)
libevent.  Grab it at

it's still incomplete, but i think it's already a simple and usable
approach for non-blocking I/O.  The biggest missing parts are around
the 'fd accessor' facilities (a few functions to let you use any 'file
like' Lua object for your events, just as long as there's a Lua or C
function to get the file descriptor number from the object.  LuaSocket
has them (socked:getfd()), and i've provided one for standard Lua
files (levent.fdfromfile(file))).

I've preserved the 'event driven' architecture of libevent, and also
the 'buffered events' objects, that let you read/write on demand to a
buffer, which will be filled/drained from/to the underlying file
automatically and nonblockingly.

Of course, it's still missing real docs (but there's a sizable
README), and a LuaForge project.

I also didn't waste much time with libevent's http server, since i
think it can be done better in Lua (i've heard there are a few
existing http servers in pure Lua...)

please check it, i'll appreciate any comments, and advices, bot on the
code and how to make day-time hallucinations bring me caffeinated