mirror of
https://github.com/php/doc-es.git
synced 2026-03-24 07:22:16 +01:00
Sync 40 Spanish translation files with latest English source changes: - context/, wrappers/: bump hashes (role attributes already applied) - control-structures/: indentation and typo fixes - oop5/final: indentation restructure, split note blocks - oop5/property-hooks: add missing property declaration in example - oop5/visibility: add PHP 8.5 asymmetric visibility for static properties - operators/precedence: add pipe operator and throw rows - predefined/attributes: add TARGET_CONSTANT for PHP 8.5 - predefined/closure: add getcurrent entity reference - predefined/*: bump hashes (phpdoc entity changes already applied)
217 lines
6.2 KiB
XML
217 lines
6.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 8bc832a464e33122e8129f5a623bd845b69fa7e0 Maintainer: PhilDaiguille Status: ready -->
|
|
<!-- Reviewed: yes -->
|
|
|
|
<refentry xml:id="context.socket" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" annotations="verify_info:false" role="stream_context_option">
|
|
<refnamediv>
|
|
<refname>Opciones de contexto de los sockets</refname>
|
|
<refpurpose>Lista de opciones de contexto de los sockets</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description"><!-- {{{ -->
|
|
&reftitle.description;
|
|
<para>
|
|
Las opciones de contexto de los sockets están disponibles para todos los gestores que funcionan a través de los sockets, como
|
|
<literal>tcp</literal>, <literal>http</literal> y
|
|
<literal>ftp</literal>.
|
|
</para>
|
|
</refsect1><!-- }}} -->
|
|
|
|
<refsect1 role="options"><!-- {{{ -->
|
|
&reftitle.options;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry xml:id="context.socket.bindto">
|
|
<term><parameter>bindto</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Utilizado para especificar la dirección IP (ya sea IPv4 o IPv6), y/o
|
|
el número del puerto que PHP utilizará para acceder a la red.
|
|
La sintaxis es <literal>ip:puerto</literal> para las direcciones IPv4,
|
|
y <literal>[ip]:puerto</literal> para las direcciones IPv6.
|
|
El hecho de definir la IP o el puerto a <literal>0</literal> permitirá
|
|
al sistema elegir el puerto y/o la IP por sí mismo.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Dado que FTP crea 2 sockets de conexión durante una operación normal,
|
|
el número del puerto no puede ser especificado utilizando esta opción.
|
|
</para>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="context.socket.backlog">
|
|
<term><parameter>backlog</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Utilizado para limitar el número de conexiones activas
|
|
en la lista de espera del socket.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Esto solo es aplicable a la función
|
|
<function>stream_socket_server</function>.
|
|
</para>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="context.socket.ipv6_v6only">
|
|
<term><parameter>ipv6_v6only</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Sustituye el sistema operativo por defecto en cuanto al mapeo de IPv4 en IPv6.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Esto es importante en particular cuando se intenta escuchar en
|
|
las direcciones IPv4 por separado mientras existe una ligadura en <literal>[::]</literal>.
|
|
</para>
|
|
<para>
|
|
Esto solo es aplicable a la función <function>stream_socket_server</function>.
|
|
</para>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="context.socket.so_reuseport">
|
|
<term><parameter>so_reuseport</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Permite múltiples ligaduras de una misma pareja ip:puerto, incluso desde procesos distintos.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Esto solo es aplicable a la función <function>stream_socket_server</function>.
|
|
</para>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="context.socket.so_broadcast">
|
|
<term><parameter>so_broadcast</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Permite enviar y recibir datos hacia/desde direcciones de difusión.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Esto solo es aplicable a la función <function>stream_socket_server</function>.
|
|
</para>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="context.socket.tcp_nodelay">
|
|
<term><parameter>tcp_nodelay</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Poner el valor a &true; definirá <literal>SOL_TCP,NO_DELAY=1</literal>
|
|
correctamente, lo que desactivará el algoritmo TCP Nagle.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1><!-- }}} -->
|
|
|
|
<refsect1 role="changelog"><!-- {{{ -->
|
|
&reftitle.changelog;
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>7.1.0</entry>
|
|
<entry>
|
|
Adición del parámetro <parameter>tcp_nodelay</parameter>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.0.1</entry>
|
|
<entry>
|
|
Adición del parámetro <parameter>ipv6_v6only</parameter>.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</refsect1><!-- }}} -->
|
|
|
|
<refsect1 role="examples"><!-- {{{ -->
|
|
&reftitle.examples;
|
|
<para>
|
|
<example xml:id="context.socket.example-bindto"><!-- {{{ -->
|
|
<title>Ejemplo de uso del parámetro <parameter>bindto</parameter></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// Conexión a Internet utilizando la IP '192.168.0.100'
|
|
$opts = array(
|
|
'socket' => array(
|
|
'bindto' => '192.168.0.100:0',
|
|
),
|
|
);
|
|
|
|
// Conexión a Internet utilizando la IP '192.168.0.100' y el puerto '7000'
|
|
$opts = array(
|
|
'socket' => array(
|
|
'bindto' => '192.168.0.100:7000',
|
|
),
|
|
);
|
|
|
|
// Conexión a Internet utilizando la dirección IPv6 '2001:db8::1'
|
|
// y el puerto '7000'
|
|
$opts = array(
|
|
'socket' => array(
|
|
'bindto' => '[2001:db8::1]:7000',
|
|
),
|
|
);
|
|
|
|
// Conexión a Internet utilizando el puerto '7000'
|
|
$opts = array(
|
|
'socket' => array(
|
|
'bindto' => '0:7000',
|
|
),
|
|
);
|
|
|
|
// Creación del contexto...
|
|
$context = stream_context_create($opts);
|
|
|
|
// ...y se utiliza para recuperar los datos
|
|
echo file_get_contents('http://www.example.com', false, $context);
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example><!-- }}} -->
|
|
</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
|
|
-->
|