lua-users home
lua-l archive

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


Hi,

I have a lua application on unix which reads from stdio - there is some significant work it could do if there is no input. I thought about kludging up a shim which would read from stdio, and write to a socket, from which my app could read from in non-blocking mode using the luasocket facilities.

It would be nice if the stdio facilities could use the luasocket 'select' interface, etc. Any ideas?

It would be nice, indeed.

Unfortunately, on Windows, select only supports sockets.
Even on Unix, passing the file descriptor used by a stdio FILE * to select would be problematic due to input/output buffering.
LuaSocket does its own buffering, so I know exactly what is
going on.

[]s,
Diego.