Bug #10305 Updated: feof() does not work on udp-socket

From: Date: Tue, 12 Jun 2001 04:52:43 +0000
Subject: Bug #10305 Updated: feof() does not work on udp-socket
Groups: php.dev 
Request: Send a blank email to php-dev+get-57208@lists.php.net to get a copy of this message
ID: 10305 Updated by: sniper Reported By: jorfen@topmail.de Old-Status: Open Status: Bogus Bug Type: Sockets related Operating system: PHP Version: 4.0.4pl1 Assigned To: Comments: submitted twice Previous Comments: --------------------------------------------------------------------------- [2001-04-12 11:12:28] jorfen@topmail.de <? function foo($ip,$port) { $fp = fsockopen("udp://".$ip,$port); socket_set_blocking($fp,FALSE); fwrite($fp,"ÿÿÿÿinfox00"); while (!feof($fp)) { $a = fread($fp,5000); if ($a) echo $a; } fclose($fp); } ?> This code is for querying a HalfLife-Server (left out if ($fp) ...). It never leaves the while-loop because feof() never changes its state to TRUE. The same method in C, Perl etc works perfectly so I assume there is a problems with PHP and UDP-Sockets. (recent version from CVS do not work, too) --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=10305&edit=2

« previous php.dev (#57208) next »