[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANNOUNCE]: LuaSocket 2.0 beta
- From: Daniel Quintela <danielq@...>
- Date: Sat, 19 Jun 2004 14:25:20 -0300
I understood the message: if I am going to be dirty I must clean myself. :)
It sounds fair for me.
----- Original Message -----
To: "Lua list" <email@example.com>
Sent: Saturday, June 19, 2004 1:50 PM
Subject: Re: [ANNOUNCE]: LuaSocket 2.0 beta
> > I like very much the setfd method added in 2.0, but...
> I knew someone would notice the undocumented things before
> anyone noticed the new documented things. :o)
> > First problem can be worked around setting the fd to INVALID_SOCKET
> > skt:close( ).
> > But for the second problem, I suggest to add a socket_destroy ( in
> > on the current OS fd before setting the new one.
> Since we are talking about being dirty, if I understood your problem,
> here is another undocumented ugly thing you can do:
> skt = socket.tcp()
> Please understand that this is "hacking" LuaSocket. Setting to a
> bogus file descriptor might crash LuaSocket and there is no way I can
> prevent it. All I am saying is that (unofficially) skt:close() doesn't
> do anything crazy. It just closes the fd.
> You can even create a tcp bject and leave it there just to call
> on every fd you have. (ewwwww)