ID:               35224
 Updated by:       [EMAIL PROTECTED]
 Reported By:      rh at alflex dot nl
-Status:           Open
+Status:           Feedback
 Bug Type:         Sockets related
 Operating System: Gentoo on Xeon64
 PHP Version:      5.0.5
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip




Previous Comments:
------------------------------------------------------------------------

[2005-11-15 10:19:43] rh at alflex dot nl

Description:
------------
stream_select() returns 0 while the first array provided does contain a
changed socket (one waiting to be stream_socket_accpet()'ted)

same code does work with same php version on gentoo on a P2 text
machine.
My solution is to use $count = count($read); afther the stream_select()

Reproduce code:
---------------
$socket = stream_socket_server("tcp://0.0.0.0:4141", $errno, $errstr);
$read[] = $socket;

$mod_fd = stream_select($read, $_w = NULL, $_e = NULL, 5);
echo $mod_fd;
$mod_fd = count($read);
echo $mod_fd;

Expected result:
----------------
twice 1 when there is a waiting socket

Actual result:
--------------
0 and 1


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35224&edit=1

Reply via email to