lua-users home
lua-l archive

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

Does this actually work in a platform independant way?  ie, on Windows?

Hmm, on a related note, it would be nice to have a general event/signal mechanism as a module, that other modules used, for such things. Even this capability doesn't solve other issues, such as waiting for another thread, or some UI event, or some other module...

Without standardisation on this, it can be really difficult to get different modules to 'play nice' in an asynchronous manner.

Love, Light and Peace,
- Peter Loveday
Director of Development, eyeon Software

----- Original Message ----- From: "Diego Nehab" <>
To: "Lua list" <>
Sent: Thursday, June 10, 2004 4:24 AM
Subject: Re: Does it make sense to add general file descriptor support to LuaSocket 2.0?


I'm very fond of Lua5 and LuaSocket 2.0, but I have one issue that I'd
like to address.

I use Lua to monitor network communication ~and~ data coming in on a
RS-232 port.

It'd be great if I add the file descriptor for the serial port into
the list uses.

Is this crazy? If not, how much of a hack would this be to LuaSocket?

The hack is already there. The new select implementation only requires you
to provide a getfd method in the object you want to call select on. I know
this is dirty and might crash, but I am not documenting it and expecting
only people that know what they are doing (such as yourself) to use it.