Edit report at http://bugs.php.net/bug.php?id=30926&edit=1
ID: 30926 Updated by: [email protected] Reported by: igor at gameplasma dot com Summary: change the return value of socket_select() ! -Status: Open +Status: Bogus Type: Feature/Change Request -Package: Feature/Change Request +Package: Sockets related Operating System: Linux PHP Version: Irrelevant Block user comment: N Private report: N New Comment: >From http://www.php.net/socket_select "No socket resource must be added to any set if you do not intend to check its result after the socket_select() call, and respond appropriately. After socket_select() returns, all socket resources in all arrays must be checked. Any socket resource that is available for writing must be written to, and any socket resource available for reading must be read from." Previous Comments: ------------------------------------------------------------------------ [2004-11-29 02:59:47] igor at gameplasma dot com Description: ------------ Hi, I've noticed that when using socket_select() it will return an integer greater than 0 when something has happened to one of the sockets we are watching. Then, if we are watching, say 100 sockets, we must go through each one of them until we find the one we can now access. Instead, how about returning an array with 2 elements? $array[0] will be a pointer to the socket that was changed $array[1] will be "r" or "w" or "e" to indicate whether it's now avaible for read, write, or there is an error :). Thanks! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=30926&edit=1
