mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Added documentation for the optional 4th parameter for sockets read() func.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@49120 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
ba42adc53f
commit
86653c5a0a
1 changed files with 23 additions and 2 deletions
|
@ -408,18 +408,39 @@ echo "OK.\n\n";
|
|||
<funcprototype>
|
||||
<funcdef>int <function>read</function></funcdef>
|
||||
<paramdef>int <parameter>socket_des</parameter></paramdef>
|
||||
<paramdef>string <parameter>&buffer</parameter></paramdef>
|
||||
<paramdef>string <parameter>buffer</parameter></paramdef>
|
||||
<paramdef>int <parameter>length</parameter></paramdef>
|
||||
<paramdef>int <parameter><optional>type</optional></parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
The function <function>read</function> reads from socket
|
||||
<parameter>socket_des</parameter>created by the
|
||||
<function>accept_connect</function> function into
|
||||
<parameter>&buffer</parameter> the number of bytes set by
|
||||
<parameter>buffer</parameter> the number of bytes set by
|
||||
<parameter>length</parameter>. Otherwise you can use \n, \t or \0 to
|
||||
end reading. Returns number of bytes that have been read.
|
||||
</para>
|
||||
<para>
|
||||
Optional <parameter>type</parameter> parameter is a named constant:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
PHP_READ_SYSTEM - use the system read()
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
PHP_READ_BINARY - binary safe read() (same as PHP_READ_SYSTEM)
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
PHP_READ_NORMAL - Default. Reading stops at \n or \r.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
See also
|
||||
<function>accept_connect</function>,
|
||||
|
|
Loading…
Reference in a new issue