adding functions

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@35036 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Ron Chmara 2000-11-02 08:14:12 +00:00
parent e2897ed00e
commit 3d2dbe6962

View file

@ -397,6 +397,42 @@ echo "OK.\n\n";
</refsect1>
</refentry>
<refentry id="function.read">
<refnamediv>
<refname>read</refname>
<refpurpose>Read from a socket</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>int <function>read</function></funcdef>
<paramdef>int <parameter>socket_des</parameter></paramdef>
<paramdef>string <parameter>&amp;buffer</parameter></paramdef>
<paramdef>int <parameter>length</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>&amp;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>
See also
<function>accept_connect</function>,
<function>bind</function>,
<function>connect</function>,
<function>listen</function>,
<function>strerror</function>,
<function>socket_get_status</function>. and
<function>write</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.socket">
<refnamediv>
<refname>socket</refname>
@ -513,6 +549,40 @@ if (($ret = bind ($socket, '127.0.0.1', 80)) &lt; 0) {
</refsect1>
</refentry>
<refentry id="function.write">
<refnamediv>
<refname>write</refname>
<refpurpose>Write to a socket</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>int <function>write</function></funcdef>
<paramdef>int <parameter>socket_des</parameter></paramdef>
<paramdef>string <parameter>&amp;buffer</parameter></paramdef>
<paramdef>int <parameter>length</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
The function <function>write</function> writes to the socket
<parameter>socket_des</parameter> from
<parameter>&amp;buffer</parameter> the number of bytes set by
<parameter>length</parameter>.
</para>
<para>
See also
<function>accept_connect</function>,
<function>bind</function>,
<function>connect</function>,
<function>listen</function>,
<function>read</function>,
<function>strerror</function>, and
<function>socket_get_status</function>.
</para>
</refsect1>
</refentry>
</reference>
<!-- Keep this comment at the end of the file