cvs: phpdoc /en/reference/sockets/functions socket-read.xml
| From: | Nuno Lopes | Date: | Tue, 15 Feb 2005 12:09:22 +0000 |
| Subject: | cvs: phpdoc /en/reference/sockets/functions socket-read.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969366629@lists.php.net to get a copy of this message | ||
nlopess Tue Feb 15 07:09:22 2005 EDT
Modified files:
/phpdoc/en/reference/sockets/functions socket-read.xml
Log:
fix #28141: return values - false/empty string
http://cvs.php.net/diff.php/phpdoc/en/reference/sockets/functions/socket-read.xml?r1=1.5&r2=1.6&ty=u
Index: phpdoc/en/reference/sockets/functions/socket-read.xml
diff -u phpdoc/en/reference/sockets/functions/socket-read.xml:1.5
phpdoc/en/reference/sockets/functions/socket-read.xml:1.6
--- phpdoc/en/reference/sockets/functions/socket-read.xml:1.5 Sun Feb 13 09:19:01 2005
+++ phpdoc/en/reference/sockets/functions/socket-read.xml Tue Feb 15 07:09:21 2005
@@ -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.8 -->
<refentry id="function.socket-read">
<refnamediv>
@@ -25,15 +25,16 @@
</para>
<para>
<function>socket_read</function> returns the data as a string on success, or
- &false; on error. The error code can be retrieved with
<function>socket_last_error</function>.
- This code may be passed to <function>socket_strerror</function> to get a textual
- representation of the error.
+ &false; on error (including if the remote host has closed the
+ connection). The error code can be retrieved with
+ <function>socket_last_error</function>. This code may be passed to
+ <function>socket_strerror</function> to get a textual representation of
+ the error.
</para>
<note>
<para>
- <function>socket_read</function> may return a zero length string ("")
- indicating the end of communication (i.e. the remote end point has
- closed the connection).
+ <function>socket_read</function> returns a zero length string ("")
+ when there is no more data to read.
</para>
</note>
<para>
@@ -41,9 +42,8 @@
<itemizedlist>
<listitem>
<simpara>
- PHP_BINARY_READ - use the system <literal>read()</literal> function.
- Safe for reading binary data. (Default in PHP
- >= 4.1.0)
+ PHP_BINARY_READ - use the system <literal>recv()</literal> function.
+ Safe for reading binary data. (Default in PHP >= 4.1.0)
</simpara>
</listitem>
<listitem>