lua-users home
lua-l archive

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


On Sun, 2010-10-03 at 09:11 -0400, Scott Vokes wrote:
> On Sat, Oct 2, 2010 at 9:56 PM,  <nkiesel@tbdnetworks.com> wrote:
> > I use luasoap to talk to a server (vmware) and right now every soap call
> > creates a new TCP socket (and closes it after the call).  As I'm actually
> > using https, this means setting up the ssl connection for every call.  I
> > thought I might avoid that by explicitly opening and closing the socket
> > (in my login/logout methods), but I can't figure out how to do that.
>    Perhaps I'm misunderstanding you, but you should be able to use
> socket.setoption(yoursocket, 'keepalive') to maintain a pool of active
> connections and socket.close(yoursocket) to explictly close them.

Tried that, but does not make a (visible) difference.  The socket is
closed before the return of the http.request call done in the soap
library.

I also disabled all obvious close methods in soap.lua, socket.lua, and
http.lua (just to see which one closes it, I know that is not a real
solution), but socket is still closed (e.g. getfd() on the socket
returns -1 after the http.request call).


</nk>