cvs: phpdoc /en/reference/sockets/functions socket-select.xml

From: Date: Fri, 10 May 2002 07:57:20 +0000
Subject: cvs: phpdoc /en/reference/sockets/functions socket-select.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969345405@lists.php.net to get a copy of this message
mfischer Fri May 10 03:57:20 2002 EDT Modified files: /phpdoc/en/reference/sockets/functions socket-select.xml Log: - Add a more verbose example. Index: phpdoc/en/reference/sockets/functions/socket-select.xml diff -u phpdoc/en/reference/sockets/functions/socket-select.xml:1.5 phpdoc/en/reference/sockets/functions/socket-select.xml:1.6 --- phpdoc/en/reference/sockets/functions/socket-select.xml:1.5 Mon May 6 10:51:41 2002 +++ phpdoc/en/reference/sockets/functions/socket-select.xml Fri May 10 03:57:20 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-select"> <refnamediv> @@ -49,6 +49,21 @@ empty array or &null; instead. Also do not forget that those arrays are passed <emphasis>by reference</emphasis> and will be modified after <function>socket_select</function> returns. + </para> + <para> + Example: + <programlisting role="php"> +<![CDATA[ +/* Prepare the read array */ +$read = array($socket1, $socket2); + +if (false === ($num_changed_sockets = socket_select($read, $write = NULL, $except = NULL, 0))) { + /* Error handling */ +else if ($num_changed_sockets > 0) { + /* At least at one of the sockets something interesting happened */ +} +]]> + </programlisting> </para> <note> <para>

« previous php.doc (#969345405) next »