From: "Gary ." on
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).
From: "Gary ." on
On Mon, Jul 19, 2010 at 9:45 AM, Gary wrote:
> How can I get calls to scoket_read to timeout if the server stops
> responding?

Sorry. Found it:
socket_set_option($sock, SOL_SOCKET, SO_RCVTIMEO, array('sec' => 1,
'usec' => 0));
 | 
Pages: 1
Prev: help using phpadmin
Next: enabling domdocument