mfischer Tue Apr 30 18:53:26 2002 EDT Modified files: /phpdoc/en/reference/sockets/functions socket-accept.xml Log: - Update docs. Index: phpdoc/en/reference/sockets/functions/socket-accept.xml diff -u phpdoc/en/reference/sockets/functions/socket-accept.xml:1.2 phpdoc/en/reference/sockets/functions/socket-accept.xml:1.3 --- phpdoc/en/reference/sockets/functions/socket-accept.xml:1.2 Wed Apr 17 02:44:06 2002 +++ phpdoc/en/reference/sockets/functions/socket-accept.xml Tue Apr 30 18:53:24 +2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> <refentry id="function.socket-accept"> <refnamediv> @@ -9,36 +9,36 @@ <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>socket_accept</methodname> + <type>resource</type><methodname>socket_accept</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> </methodsynopsis> - &warn.experimental.func; + &warn.experimental.func; <para> After the socket <parameter>socket</parameter> has been created using <function>socket_create</function>, bound to a name with <function>socket_bind</function>, and told to listen for connections with <function>socket_listen</function>, this function will accept incoming connections on that socket. Once a successful connection - is made, a new socket descriptor is returned, which may be used + is made, a new socket resource is returned, which may be used for communication. If there are multiple connections queued on the socket, the first will be used. If there are no pending connections, <function>socket_accept</function> will block until a connection becomes present. If <parameter>socket</parameter> has been made non-blocking using <function>socket_set_blocking</function> or - <function>socket_set_nonblock</function>, an error code will be - returned. + <function>socket_set_nonblock</function>, &false; will be returned. </para> <para> - The socket descriptor returned by + The socket resource returned by <function>socket_accept</function> may not be used to accept new connections. The original listening socket <parameter>socket</parameter>, however, remains open and may be reused. </para> <para> - Returns a new socket descriptor on success, or a negative error - code on failure. This code may be passed to + Returns a new socket resource on success, or &false; on error. The actual + error code can be retrieved by calling + <function>socket_last_error</function>. This error code may be passed to <function>socket_strerror</function> to get a textual explanation of the error. </para>