Breaks on socket_read

From: Date: Fri, 14 May 2004 19:40:57 +0000
Subject: Breaks on socket_read
Groups: php.general 
Request: Send a blank email to php-general+get-186252@lists.php.net to get a copy of this message
Can anyone suggest why this script (well, part of the script) fails on the "while(($bug=socket_read..." line after it successfully loops several times? (Of course, it is only after it timesout, but that is what I need it to do.) ---CODE---------------------------------- $msg_recv = 3; $timeout = array('sec' => 5, 'usec' => 0); // ENTER LOOP do { $data = ""; socket_set_block($socket); socket_set_option($socket,SOL_SOCKET,SO_RCVTIMEO,$timeout);
while(($buf = socket_read($socket,128,PHP_BINARY_READ)) !== false) { <<<
$data .= $buf; ---OUTPUT---------------------------------- PHP Warning: socket_read() unable to read from socket [35]: Resource temporarily unavailable in /Users/rene/Sites/gpspolice/titan/cr.php on line 65 Warning: socket_read() unable to read from socket [35]: Resource temporarily unavailable in /Users/rene/Sites/gpspolice/titan/cr.php on line 65 PHP Warning: socket_read() unable to read from socket [35]: Resource temporarily unavailable in /Users/rene/Sites/gpspolice/titan/cr.php on line 65

« previous php.general (#186252) next »