Re: RPC::XML set request timeout...
by Dominic Mitchell other posts by this author
Dec 25 2005 5:46AM messages near this date
view in the new Beta List Site
Re: RPC::XML set request timeout...
|
Re: RPC::XML set request timeout...
& XSLT On Fri, Dec 23, 2005 at 01:33:52AM -0800, Randy J. Ray wrote:
> > I would like to develop an application that makes use of the RPC::XML
> > module. Is there any way of setting a timeout parameter for the request I am
> > making to a server, in order to detect a situation where the server URL is
> > not correct or the server is down for example?
>
> The RPC::XML::Client object provides a method, "useragent", that gives you
> access to the underlying LWP::UserAgent it uses for actual HTTP
> communications. You can use this reference to set a timeout via the
> "timeout" method (see the manpage for LWP::UserAgent).
Just a word of warning about timeouts and LWP... If you set a timeout
when already connected, it will be ignored. This is particularly
relevant if you're also using keep_alive=> 1.
It's probably best to set the timeout before your first remote call.
-Dom
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Aristotelis
Randy J. Ray
Dominic Mitchell
Ulisses Reina Montenegro
|