PATCH - fractional timeouts
| From: | Andreas Schiffler | Date: | Thu, 22 Dec 2005 16:01:52 +0000 |
| Subject: | PATCH - fractional timeouts | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-21323@lists.php.net to get a copy of this message | ||
Hi,
attached is the fractional timeout patch I made ... its against the
PHP_5_1 sources pulled from CVS this morning. It tries to cover all code
that is found from a grep for "default_socket_timeout" and "tv.tv_sec".
Testing:
- I checked php.ini parsing (i.e. timeout set to 0.5) via phpinfo() .
- I tested the changes using my soapclient/server setup. Works via
manual setup via ini_set() and via global setup in php.ini (fractional
timeout is automatically propagated into the soap request).
A combination of:
ini_set('default_connection_timeout',0.5);
$client = new SoapClient("my.wsdl", array("connection_timeout"=>0.5));
will result in a deterministic return time of the call
$result = $client->myFunc();
within 500ms +/- 5ms during error conditions (i.e. soap func to slow or
connection dead).
I am not sure what else to test right now ... but in particular, the
changes I made to the FTP and IMAP code should get looked at for sanity
(probably best by the maintainers).
Best regards
Andreas