Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 13112

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Set the idle callback function</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="zmqdevice.run.html">ZMQDevice::run</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="zmqdevice.setidletimeout.html">ZMQDevice::setIdleTimeout</a></div>
 <div class="up"><a href="class.zmqdevice.html">ZMQDevice</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="zmqdevice.setidlecallback" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ZMQDevice::setIdleCallback</h1>
  <p class="verinfo">(No version information available, might only be in SVN)</p><p class="refpurpose"><span class="refname">ZMQDevice::setIdleCallback</span> &mdash; <span class="dc-title">Set the idle callback function</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-zmqdevice.setidlecallback-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type"><a href="class.zmqdevice.html" class="type ZMQDevice">ZMQDevice</a></span> <span class="methodname"><strong>ZMQDevice::setIdleCallback</strong></span>
    ( <span class="methodparam"><span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span> <code class="parameter">$cb_func</code></span>
   , <span class="methodparam"><span class="type">integer</span> <code class="parameter">$timeout</code></span>
   [, <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$user_data</code></span>
  ] )</div>

  <p class="para rdfs-comment">
   Sets the idle callback function. If idle timeout is defined the idle callback function
   shall be called if the internal poll loop times out without events. If the callback function
   returns false or a value that evaluates to false the device is stopped.

   The callback function signature is callback (mixed $user_data).
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-zmqdevice.setidlecallback-parameters">
  <h3 class="title">Parameters</h3>
  <dl>

   <dt>

    <span class="term"><em><code class="parameter">cb_func</code></em></span>
    <dd>

     <p class="para">
      Callback function to invoke when the device is idle. Returning false
      or a value that evaluates to false from this function will cause the 
      device to stop.
     </p>
    </dd>

   </dt>

   <dt>

    <span class="term"><em><code class="parameter">timeout</code></em></span>
    <dd>

     <p class="para">
      How often to invoke the idle callback in milliseconds. The idle callback is invoked
      periodically when there is no activity on the device.
      The timeout value guarantees that there is at least this amount of milliseconds between
      invocations of the callback function.
     </p>
    </dd>

   </dt>

   <dt>

    <span class="term"><em><code class="parameter">user_data</code></em></span>
    <dd>

     <p class="para">
      Additional data to pass to the callback function.
     </p>
    </dd>

   </dt>

  </dl>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-zmqdevice.setidlecallback-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   On success this method returns the current object.
  </p>
 </div>



</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="zmqdevice.run.html">ZMQDevice::run</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="zmqdevice.setidletimeout.html">ZMQDevice::setIdleTimeout</a></div>
 <div class="up"><a href="class.zmqdevice.html">ZMQDevice</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>