nlopess Thu Jan 18 16:21:02 2007 UTC Added files: /phpdoc/en/reference/stream/functions stream-socket-shutdown.xml
Modified files: /phpdoc/en/reference/stream constants.xml Log: add initial docs for stream_socket_shutdown http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/stream/constants.xml?r1=1.14&r2=1.15&diff_format=u Index: phpdoc/en/reference/stream/constants.xml diff -u phpdoc/en/reference/stream/constants.xml:1.14 phpdoc/en/reference/stream/constants.xml:1.15 --- phpdoc/en/reference/stream/constants.xml:1.14 Thu Dec 16 11:29:35 2004 +++ phpdoc/en/reference/stream/constants.xml Thu Jan 18 16:21:02 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14 $ --> +<!-- $Revision: 1.15 $ --> <section id="stream.constants"> &reftitle.constants; &extension.constants; @@ -277,6 +277,27 @@ for out-of-band data (TCP, for example). </entry> </row> + <row> + <entry><constant>STREAM_SHUT_RD</constant></entry> + <entry> + Used with <function>stream_socket_shutdown</function> to disable + further receptions. Added in PHP 5.2.1. + </entry> + </row> + <row> + <entry><constant>STREAM_SHUT_WR</constant></entry> + <entry> + Used with <function>stream_socket_shutdown</function> to disable + further transmissions. Added in PHP 5.2.1. + </entry> + </row> + <row> + <entry><constant>STREAM_SHUT_RDWR</constant></entry> + <entry> + Used with <function>stream_socket_shutdown</function> to disable + further receptions and transmissions. Added in PHP 5.2.1. + </entry> + </row> </tbody> </tgroup> </informaltable> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/stream/functions/stream-socket-shutdown.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/stream/functions/stream-socket-shutdown.xml +++ phpdoc/en/reference/stream/functions/stream-socket-shutdown.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.stream-socket-shutdown"> <refnamediv> <refname>stream_socket_shutdown</refname> <refpurpose>Shutdown a full-duplex connection</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>int</type><methodname>stream_socket_shutdown</methodname> <methodparam><type>resource</type><parameter>stream</parameter></methodparam> <methodparam><type>int</type><parameter>how</parameter></methodparam> </methodsynopsis> <para> Shutdowns (partially or not) a full-duplex connection. </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>stream</parameter></term> <listitem> <para> An open stream (opened with <function>stream_socket_client</function>, for example) </para> </listitem> </varlistentry> <varlistentry> <term><parameter>how</parameter></term> <listitem> <para> One of the following constants: <constant>STREAM_SHUT_RD</constant> (disable further receptions), <constant>STREAM_SHUT_WR</constant> (disable further transmissions) or <constant>STREAM_SHUT_RDWR</constant> (disable further receptions and transmissions). </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> &return.success; </para> </refsect1> <refsect1 role="examples"> &reftitle.examples; <para> <example> <title>A <function>stream_socket_shutdown</function> example</title> <programlisting role="php"> <![CDATA[ <?php $server = stream_socket_server('tcp://127.0.0.1:1337'); $client = stream_socket_client('tcp://127.0.0.1:1337'); var_dump(fputs($client, "hello")); stream_socket_shutdown($client, STREAM_SHUT_WR); var_dump(fputs($client, "hello")); // doesn't work now ?> ]]> </programlisting> &example.outputs.similar; <screen> <![CDATA[ int(5) Notice: fputs(): send of 5 bytes failed with errno=32 Broken pipe in test.php on line 9 int(0) ]]> </screen> </example> </para> </refsect1> <refsect1 role="seealso"> &reftitle.seealso; <para> <simplelist> <member><function>fclose</function></member> </simplelist> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->