lua-users home
lua-l archive

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

LuaEvent is a binding layer for libevent to Lua. This release offers a
mostly-working copas replacement. Later releases may offer more
powerful features (such as buffer-io).
This should work very well for applications that need a fast
event-loop for socket handling such as P2P apps, webservers, chat
applications, etc...

Some issues exist in the current implementation...
* Currently sockets that are accepted on the server-side are never
freed.  This is because I need to keep an event object around as
userdata... I think I may have a solution... make it referenced inside
itself on the C end and only destroy it when either:
+ The callback function returns completion or error... (in Lua side,
meaning coroutine is complete or error occurred)
+ OR The base object is getting deleted, though that will need a fenv
storage in the base object.. not too big a deal, and should be there
to prevent the base freeing before the objects...

* The other strange issue is that somehow libevent is accessing data
beyond the bounds of an internal array when the maximum # of sockets
is hit (the libevent item shouldn't be setup anyways, since it
/should/ be bailing out before then... I'll need to look into the
interaction between LuaSocket, libevent, and my binding.

I have packaged tarballs (fastest way) and an SVN up on .. its kinda slow, but it doesn't bind me to another
service like SourceForge... and I don't want to deal with CVS because
I use SVN and SVK for everything else... is the svn location...
I have yet to setup the real web page...

If anyone can look at the source, perhaps shrink it simpler or
implement the fixes, that'd be great... If anyone wants to join in on
the project after doing some patches, feel free to contact me about
that (after patches I'd get some idea on your ability to

My time for working on this project is limited to bursts and I may
have very little time in the near future since I'm closing on a new
house, cleaning a townhome, all the while keeping a baby girl
Thomas Harning Jr.