note 46475 added to function.socket-create-pair
| From: | benst at wallypalace dot com | Date: | Tue, 12 Oct 2004 19:27:56 +0000 |
| Subject: | note 46475 added to function.socket-create-pair | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-78448@lists.php.net to get a copy of this message | ||
the returned sockets do not work well with the stream_select function !
if you already use streams you can use this :
<?
function all_select(&$sr, &$sw, &$or, &$ow) {
$e = array();
$ss = stream_select($sr, $sw, $e, 0);
$so = socket_select($or, $ow, $e, 0);
return $so + $ss;
}
?>
you loose the ability to use the timeout but there is no other way i know of.
----
Manual Page -- http://www.php.net/manual/en/function.socket-create-pair.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46475
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46475&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46475&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46475&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46475&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46475&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46475&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46475&report=yes
Search -- http://master.php.net/manage/user-notes.php