[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Does it make sense to add general file descriptor support to LuaSocket 2.0?
- From: Diego Nehab <diego@...>
- Date: Wed, 9 Jun 2004 14:54:01 -0400 (EDT)
> 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 socket.select 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.