Documented close() and added some more information to the partintro.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@32164 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Torben Wilson 2000-09-07 02:44:12 +00:00
parent 5811602ba6
commit b92b56e24b

View file

@ -8,6 +8,13 @@
as a socket server as well as a client.
</simpara>
<para>
The socket functions described here are part of an extension to
PHP which must be enabled at compile time by giving the <option
role="configure">--enable-sockets</option> option to
<command>configure</command>.
</para>
<para>
For a more generic client-side socket interface, see
<function>fsockopen</function> and
@ -15,10 +22,10 @@
</para>
<para>
When using the socket functions described here, it is important to
remember that while many of them have identical names to their C
counterparts, they often have different declarations. Please be
sure to read the descriptions to avoid confusion.
When using these functions, it is important to remember that while
many of them have identical names to their C counterparts, they
often have different declarations. Please be sure to read the
descriptions to avoid confusion.
</para>
<para>
@ -271,6 +278,47 @@ echo "OK.\n\n";
</refsect1>
</refentry>
<refentry id="function.close">
<refnamediv>
<refname>close</refname>
<refpurpose>Closes a file descriptor.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>bool <function>close</function></funcdef>
<paramdef>int <parameter>socket</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>close</function> closes the file (or socket) descriptor
given by <parameter>socket</parameter>.
</para>
<para>
Note that <function>close</function> should not be used on PHP
file descriptors created with <function>fopen</function>,
<function>popen</function>, <function>fsockopen</function>, or
<function>psockopen</function>; it is meant for sockets created
with <function>socket</function> or
<function>accept_connect</function>.
</para>
<para>
Returns true on success, or false if an error occurs (i.e.,
<parameter>socket</parameter> is invalid).
</para>
<para>
See also <function>bind</function>, <function>listen</function>,
<function>socket</function>, and <function>strerror</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.connect">
<refnamediv>
<refname>connect</refname>