mirror of
https://github.com/php/doc-es.git
synced 2026-03-26 08:22:08 +01:00
Ignore entities.*.xml git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@310922 c90b9560-bf6c-de11-be94-00142212c4b1
120 lines
2.9 KiB
XML
120 lines
2.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: seros Status: ready -->
|
|
<refentry xml:id="function.stream-socket-shutdown" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>stream_socket_shutdown</refname>
|
|
<refpurpose>Cerrar una conexión full-duplex</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>stream_socket_shutdown</methodname>
|
|
<methodparam><type>resource</type><parameter>stream</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>how</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Cierra (parcialmente o no) una conexión full-duplex.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>stream</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Un flujo abierto (con <function>stream_socket_client</function>,
|
|
por ejemplo)
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>how</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Una de las siguientes constantes: <constant>STREAM_SHUT_RD</constant>
|
|
(deshabilita recepciones), <constant>STREAM_SHUT_WR</constant>
|
|
(deshabilita transmisiones) o
|
|
<constant>STREAM_SHUT_RDWR</constant> (deshabilita recepciones y
|
|
transmisiones).
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Un ejemplo de <function>stream_socket_shutdown</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
$servidor = stream_socket_server('tcp://127.0.0.1:1337');
|
|
$cliente = stream_socket_client('tcp://127.0.0.1:1337');
|
|
|
|
var_dump(fputs($cliente, "hola"));
|
|
|
|
stream_socket_shutdown($cliente, STREAM_SHUT_WR);
|
|
var_dump(fputs($cliente, "hola")); // no funciona ahora
|
|
|
|
?>
|
|
]]>
|
|
</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:"~/.phpdoc/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
|
|
-->
|