lua-users home
lua-l archive

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


Hi,

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.

I believe we need some C support. I was thinking about creating a
layer in C that implements a libevent-like dispatch loop but that
uses opaque descriptors. Those could be fds on UNIX or HANDLEs on
Windows.

We would also have to adapt Lua's file I/O functions and LuaSocket
functions to integrate well with this abstraction layer.

Regards,
Diego.