mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
- Fixed example code (and shortened a bit)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@126989 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
993d188d44
commit
28d787dc38
1 changed files with 7 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 -->
|
||||
<refentry id="function.socket-select">
|
||||
<refnamediv>
|
||||
|
@ -59,9 +59,11 @@
|
|||
/* Prepare the read array */
|
||||
$read = array($socket1, $socket2);
|
||||
|
||||
if (false === ($num_changed_sockets = socket_select($read, $write = NULL, $except = NULL, 0))) {
|
||||
$num_changed_sockets = socket_select($read, $write = NULL, $except = NULL, 0);
|
||||
|
||||
if ($num_changed_sockets === false) {
|
||||
/* Error handling */
|
||||
else if ($num_changed_sockets > 0) {
|
||||
} else if ($num_changed_sockets > 0) {
|
||||
/* At least at one of the sockets something interesting happened */
|
||||
}
|
||||
]]>
|
||||
|
@ -106,7 +108,8 @@ socket_select($r, $w, $e = NULL, 0);
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
if (false === socket_select($r, $w, $e = NULL, 0)) {
|
||||
echo "socket_select() failed, reason: " . socket_strerror(socket_last_error()) . "\n";
|
||||
echo "socket_select() failed, reason: " .
|
||||
socket_strerror(socket_last_error()) . "\n";
|
||||
}
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
Loading…
Reference in a new issue