lua-users home
lua-l archive

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


(lua)posix.fileno() does what you want.

I thought in the meantime rs232 would already be really dead and not
only the usual dead :-)


On Thu, Nov 25, 2010 at 9:15 AM, Petr Štetiar <ynezz@true.cz> wrote:
> jonsmirl@gmail.com <jonsmirl@gmail.com> [2010-11-24 17:34:27]:
>
>> I'm trying to use the trick of wrapping a file descriptor for a serial
>> port in a dummy socket and then using socket.select to do non-blocking
>> IO on it.
>
> Hi,
>
> I don't know if it's what are you looking for, but there's rs232 library[1]
> for Lua. I think, that adding the non-blocking read/write wouldn't be that
> hard, I would say few lines of code. And I would welcome such contribution :-)
>
> BTW I don't know if it's even possible to do that in pure Lua.
>
> 1. https://github.com/ynezz/librs232
>
> -- ynezz
>
>