lua-users home
lua-l archive

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

On Fri, 20 Jul 2007 21:01:47 -0700 (PDT)
gary ng <> wrote:

> Or alternatively, the select() could be a seperate
> function which don't check for the object(luasocket in
> this case) but just use getfd() of the object to get
> the fd instead ?
i wrote a select() which takes arrays of fds. but it's Linux only.

and you can create new socket object, :close() it and than do :setfd()
on it with fd you want to pass to select(). this is a hack, but it
works. just don't forget to do :setfd(-1) then, or LuaSocket will
happily close this fd when GC will free your socket object.