php-developer-list | 2001041
Date: 04/12/01
- Next message: Alex Cifuentes: "[PHP-DEV] Re: Bug #10296 Updated:"
- Previous message: jorfen <email protected>: "[PHP-DEV] Bug #10304: Garbled Data/timeout with UDP-Socket"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: jorfen <email protected>
Operating system: Linux2.2.12
PHP version: 4.0.4pl1
PHP Bug Type: *Network Functions
Bug description: feof() does not work on udp-socket
<?
function foo($ip,$port)
{
$fp = fsockopen("udp://".$ip,$port);
socket_set_blocking($fp,FALSE);
fwrite($fp,"˙˙˙˙info\x00");
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)
-- Edit Bug report at: http://bugs.php.net/?id=10305&edit=1-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Alex Cifuentes: "[PHP-DEV] Re: Bug #10296 Updated:"
- Previous message: jorfen <email protected>: "[PHP-DEV] Bug #10304: Garbled Data/timeout with UDP-Socket"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

