lua-users home
lua-l archive

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


On Wed, Oct 04, 2006 at 03:49:02PM -0400, Diego Nehab wrote:
> >- It looks like socket.select() only takes a socket object, but I would
> > like to select on other file descriptors. Will I need to create a
> > fd-wrapper object in order to do this?
> 
> Quick dirty undocumented solution: Unix just use a table
> that has a getfd() and dirty() methods (check source code,
> dirty() is to support input buffering). On Windows, this
> won't work. Not my fault, though. Sockets are not file
> descriptors on Windows and select() only works with sockets.

I don't use windows. :-)

> Quick dirty undocumented solution: call setfd().
> On Unix, as long as you have the fd, you are all set.

Great, thanks.

Sam