note 69039 added to function.socket-read
| From: | Nielslaukens at osu1 dot php dot net | Date: | Mon, 21 Aug 2006 07:34:22 +0000 |
| Subject: | note 69039 added to function.socket-read | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-116112@lists.php.net to get a copy of this message | ||
This paragraph is confusing:
socket_read() returns the data as a string on success, or FALSE on error (including if the remote
host has closed the connection). The error code can be retrieved with socket_last_error(). This code
may be passed to socket_strerror() to get a textual representation of the error.
Note: socket_read() returns a zero length string ("") when there is no more data to read.
My tests (on PHP 5.1.4) show that when you socket_read() on a shutdown-socket, it returns FALSE when
using PHP_NORMAL_READ, but returns "" when reading in PHP_BINARY_READ.
----
Server IP: 82.146.33.222
Probable Submitter: 81.246.15.38
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.socket-read.php
Edit -- https://master.php.net/note/edit/69039
Del: integrated -- https://master.php.net/note/delete/69039/integrated
Del: useless -- https://master.php.net/note/delete/69039/useless
Del: bad code -- https://master.php.net/note/delete/69039/bad+code
Del: spam -- https://master.php.net/note/delete/69039/spam
Del: non-english -- https://master.php.net/note/delete/69039/non-english
Del: in docs -- https://master.php.net/note/delete/69039/in+docs
Del: other reasons-- https://master.php.net/note/delete/69039
Reject -- https://master.php.net/note/reject/69039
Search -- https://master.php.net/manage/user-notes.php