[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LibEvent binding to Lua? Mix w/ HelperThreads?
- From: Doug Currie <doug.currie@...>
- Date: Fri, 31 Mar 2006 13:11:17 -0500
Friday, March 31, 2006, 12:18:46 PM, Diego Nehab wrote:
>> Looking at the source in the libevent CVS it appears that only sockets
>> are supported since select() is used for dispatching. This makes win32
>> libevent useless for files (and timers, queues, etc.). This is what
>> drove me to roll my own using IOCP...
> Yeah, this is what I noticed from the sources too. Is your IOCP library
> compatible to libevent?
No. Libevent API is dependent on (struct timeval) and (fd) and more;
it expects (fd)s to work a la UNIX. That was too big an impedance
mismatch for me to bother accommodating.
It may be possible to make a lua wrapper that creates a common API
between libevent and a Windows IOCP library, but the abstraction would
have to be carefully designed to avoid these UNIXisms.