From e43b472ce8d1965b361f97bb7fd278fc6f341a97 Mon Sep 17 00:00:00 2001 From: Damien Seguy Date: Thu, 12 Jun 2003 01:58:19 +0000 Subject: [PATCH] correcting prototype : sockect_select accepts arrays git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@131115 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/sockets/functions/socket-select.xml | 37 ++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/reference/sockets/functions/socket-select.xml b/reference/sockets/functions/socket-select.xml index aeaf082982..2ee7c70b73 100644 --- a/reference/sockets/functions/socket-select.xml +++ b/reference/sockets/functions/socket-select.xml @@ -1,24 +1,27 @@ - + socket_select - Runs the select() system call on the given arrays of sockets with a timeout specified by tv_sec and tv_usec + + Runs the select() system call on the given arrays of sockets + with a specified timeout + Description intsocket_select - resource&read - resource&write - resource&except + array&read + array&write + array&except inttv_sec inttv_usec &warn.experimental.func; - The socket_select accepts arrays of sockets and + socket_select accepts arrays of sockets and waits for them to change status. Those coming with BSD sockets background will recognize that those socket resource arrays are in fact the so-called file descriptor sets. Three independent arrays of socket @@ -53,8 +56,9 @@ socket_select returns. - Example: - + + <function>socket_select</function> example + - + + @@ -76,11 +81,14 @@ if ($num_changed_sockets === false) { which expects this parameter to be passed by reference. Instead use a temporary variable or an expression with the leftmost member being a temporary variable: - + + Using &null; with <function>socket_select</function> + - + + @@ -105,14 +113,17 @@ socket_select($r, $w, $e = NULL, 0); Be sure to use the === operator when checking for an error. Since the socket_select may return 0 the comparison with == would evaluate to &true;: - + + Understanding <function>socket_select</function>'s result + - + +