note 55956 deleted from function.soap-soapclient-construct by aidan

From: Date: Fri, 19 Aug 2005 01:02:01 +0000
Subject: note 55956 deleted from function.soap-soapclient-construct by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-93863@lists.php.net to get a copy of this message
Note Submitter: Jim Plush ---- an undocumented feature -> setting a connection timeout $client = new SoapClient($wsdl, array("connection_timeout"=>5)); ideally you'd have two timeouts set in your application one for how long it should take to actually connect to your remote host and a timeout for how long the socket connection should wait for a response from the server the above addresses the time it takes to wait to connect to your host and this addresses the time to wait for a response ini_set('default_socket_timeout', 180); I would wrap this in a configuration option in case you distribute your package and different clients might need different timeouts when dealing with slow soap server responses. // SET SOCKET TIMEOUT if(defined('RESPONSE_TIMEOUT') && RESPONSE_TIMEOUT != '') { ini_set('default_socket_timeout', RESPONSE_TIMEOUT); }

« previous php.notes (#93863) next »