|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-11-15 10:21 UTC] sniper@php.net
[2005-11-15 10:38 UTC] rh at alflex dot nl
[2005-11-15 10:48 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 14:00:01 2025 UTC |
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