mirror of
https://github.com/php/doc-es.git
synced 2026-04-30 02:23:10 +02:00
97 lines
2.8 KiB
XML
97 lines
2.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: b4fbf4434abeca44c58575ff3967e5640f7877d5 Maintainer: PhilDaiguille Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="evwatcher.keepalive">
|
|
<refnamediv>
|
|
<refname>EvWatcher::keepalive</refname>
|
|
<refpurpose>Mantiene el bucle activo</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier>
|
|
<type>bool</type>
|
|
<methodname>EvWatcher::keepalive</methodname>
|
|
<methodparam choice="opt">
|
|
<type>bool</type>
|
|
<parameter>value</parameter>
|
|
</methodparam>
|
|
</methodsynopsis>
|
|
<simpara>
|
|
Mantiene el bucle activo. Con un parámetro <parameter>value</parameter>
|
|
definido a &false;, el Watcher no evitará que los métodos
|
|
<methodname>Ev::run</methodname>/<methodname>EvLoop::run</methodname>
|
|
se detengan incluso si el Watcher está activo.
|
|
</simpara>
|
|
<simpara>
|
|
Los Watchers tienen, por omisión, un parámetro
|
|
<parameter>value</parameter> definido a &true;.
|
|
</simpara>
|
|
<simpara>
|
|
Limpiar el estado "keepalive" es útil al regresar de los métodos
|
|
<methodname>Ev::run</methodname>/<methodname>EvLoop::run</methodname>,
|
|
en cuyo caso el Watcher ya no es deseado. Puede ser un Watcher de socket UDP
|
|
que continúa funcionando durante mucho tiempo.
|
|
</simpara>
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term>
|
|
<parameter>value</parameter>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Si es &false;, el Watcher no evitará que los métodos
|
|
<methodname>Ev::run</methodname>/<methodname>EvLoop::run</methodname>
|
|
terminen, incluso si el Watcher está activo.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<simpara>
|
|
Devuelve el estado anterior.
|
|
</simpara>
|
|
</refsect1>
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title>Registra un Watcher E/S para sockets UDP</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$udp_socket = ...
|
|
$udp_watcher = new EvIo($udp_socket, Ev::READ, function () { /* ... */ });
|
|
$udp_watcher->keepalive(FALSE);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</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
|
|
-->
|