lua-users home
lua-l archive

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


> >> Is there any working code out there doing this?
> >    For files?  I don't know, but it would be similar with files (as
> sockets
> > are file handles).
> 
> I was thinking code preparing a file handle for serving with luasocket.
> There seems to be some weird dancing involved with creating a connected
> socket, replacing its fd, then invalidating something setting a fd of
> -1, etc.
> 

LuaSec does this, but its result is still a handle for a socket. But it has some magic in setting the fd and invalidating the original.

Hth
Thijs


> Thanks,
> 
> Jorge
>