How to set socket_read time out
| From: | Gary . | Date: | Mon, 19 Jul 2010 07:45:47 +0000 |
| Subject: | How to set socket_read time out | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-306983@lists.php.net to get a copy of this message | ||
How can I get calls to scoket_read to timeout if the server stops
responding? It's not clear exactly what's happening, but occasionally
the server simply stops sending data and my php code (client) then sits
there waiting endlessly. I know about set_time_limit but I don't want to
abandon the entire script, just the reading of data from the server (I
can at least give a meaningful error message then, for example).