garry has asked for the wisdom of the Perl Monks concerning the following question:
I have a tcpdump that shows a close from the client after each response from the server; then a brand new connection is opened for the next request. My server is a simple dispatch to an in-line package. How do I get the client to use the open connection instead of closing and re-opening?use warnings; use strict; use SOAP::Lite; my $som = SOAP::Lite->uri('http://my_namespace/SOAP_ImageMgr') ->proxy('http://wshost/cgi-bin/imagemgr/imagemgr', timeout => 30, keep_alive => 1); my $url = 'http://image-url/'; for (1 .. 100) { my $resp = $som->get_image_token($url, 260, 260); if ($resp->fault()) { die("$0: can't get image handle for $url(260): ", $resp->faultstring(), "\n"); } print $resp->result(), "\n"; }
$ perl -v This is perl, v5.8.3 built for x86_64-linux-thread-multi $ perl -MSOAP::Lite -wle 'print $SOAP::Lite::VERSION' 0.60 $ perl -MLWP::UserAgent -wle 'print $LWP::UserAgent::VERSION' 2.033 $ perl -MLWP::ConnCache -wle 'print $LWP::ConnCache::VERSION' 0.01 $
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SOAP::Lite Client Closes Keep-Alive Connection
by InfiniteSilence (Curate) on Feb 06, 2006 at 21:54 UTC | |
by garry (Novice) on Feb 07, 2006 at 21:16 UTC | |
by leonardohelman (Initiate) on Apr 25, 2008 at 19:42 UTC | |
by Anonymous Monk on Dec 31, 2013 at 10:53 UTC |