note 41465 deleted from function.stream-set-timeout by nlopess
| From: | nlopess@php.net | Date: | Sun, 11 Apr 2004 14:31:04 +0000 |
| Subject: | note 41465 deleted from function.stream-set-timeout by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-67980@lists.php.net to get a copy of this message | ||
Note Submitter:
----
Why isn't the timeout parameter added in the stream "context"?
It would allow creating a context like this to set the timeout on fopen:
$http_opts = array(
'method' => 'PUT',
'header' => "Accept: text/plain\r\n");
$opts = array(
'timeout' => 10,
'http' => $http_opts);
$fp = fopen($url, "rb", stream_create_context($opts));
Then a call to stream_set_timeout() on an open stream would update the stream's context to
reflect its current timeout value...