lua-users home
lua-l archive

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


then, any IO Lua library could use this C library to create this objects and
let them all be multiplexed together.  right now, the file library and the
LuaSocket library don't know of each other, select() is in LuaSocket, LuaSQL
does only blocking IO, and so on.

There are at least two nasty reasons for LuaSocket's not
to work well with the file library.

First, on Win32, the select function call can only be used with sockets
(sockets are not even file descriptors). Getting this to work
transparently would require creating threads, which I didn't consider

Even on Unix, Lua uses stream functions (descriptors are not ANSI, I
guess). Although we could use the non-ANSI fileno function (select is
not ANSI either, so who cares?), mixing these things would require
flushing the buffers etc.

If anyone has simple solutions for these issues, please let me know. I'd
me more than happy to adopt it.