#25104 [Bgs->Csd]: socket_select only selects first socket
ID: 25104
User updated by: w at ff dot st
Reported By: w at ff dot st
-Status: Bogus
+Status: Closed
Bug Type: Sockets related
Operating System: Windows
-PHP Version: 4.3.2
+PHP Version: 4.3.1
New Comment:
After some tries, I found that I was using PHP 4.3.1 instead of 4.3.2
(path error for php.exe).
Now the code works well under linux or windows (only the telnet bug :
when you use "quit" with telnet the disconnection isn't detected by
socket_read() but socket_select() will return immediatly. Seems to be a
freature of socket_read : see doc & you'll see that socket_read can
return an empty string.).
Previous Comments:
------------------------------------------------------------------------
[2003-08-15 20:24:02] sniper@php.net
Not nearly enough data to process this report.
(try reading the bug submitting guidelines first:
http://bugs.php.net/how-to-report.php)
------------------------------------------------------------------------
[2003-08-15 19:11:12] w at ff dot st
Description:
------------
I'm writing "application" scripts with PHP (such as a FTP server).
Usually I run them under Linux.
I tried to run a script on windows, and after some debugging, I found
that socket_select() was returning only when the first socket of the
read array has data.
Under linux, it works as expected, but under windows, I had to find a
way to stop using 100% CPU (usleep not available & socket_select
returning instantly if I give all null socket arrays and a non-null
timeout).
I'll try with the stream_select() function. It won't change that
socket_select() is bogus, that's why I'm posting that.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25104&edit=1
Thread (5 messages)