ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-xml
perl-xml
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved