[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANNOUNCE]: LuaSocket 2.0.3 RC2
- From: Ignacio Burgueño <ignaciob@...>
- Date: Tue, 03 Nov 2009 18:04:50 -0200
Joseph Stewart wrote:
Maybe I don't understand the underlying problem the acceptfd patch
addresses, but if it's simply a matter of getting the file descriptor
from a luasocket object, then you can use the :getfd() function.
"It adds a new method “acceptfd” which works just like “accept” but
instead of returning a socket object it returns the underlying “file
descriptor” (a number). A new optional parameter to “socket.tcp()”
allows to create a socket object from a file descriptor."
So you could accept connections in a given Lua state and process it in a
different one. Be it by means of using Lanes, LuaProc, or whatever suits