lua-users home
lua-l archive

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


I agree getfd and setfd are not greatly thought out
features. That's why I call them hacks and that's why they
are not part of the documented API. They are there just for
debugging purposes and for people who want to use them at
their own risk.

The problem is that these functions can lead to confusion on
Windows, since socket objects are not file descriptors
Having them in the API would seem to indicate it is ok to
obtain a file descriptor from a file handle and then insert
them in a socket object. This would not work on Windows and
I don't like the idea of having this on the API.

Now, if what we are talking about functionality that allows
you to obtain this OS-dependent socket handle/descriptor and
create another LuaSocket object from it, we can discuss what
is the best API for it. It is a valid scenario that I had
not foreseen, and I'd be happy to add it to the library.

But this is not a bug, which is what I am looking for right