<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="eventlistener.setcallback" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>EventListener::setCallback</refname>
  <refpurpose>The setCallback purpose</refpurpose>
 </refnamediv>
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <modifier>public</modifier>
   <type>void</type>
   <methodname>EventListener::setCallback</methodname>
   <methodparam>
    <type>callable</type>
    <parameter>cb</parameter>
   </methodparam>
   <methodparam
   choice="opt">
    <type>mixed</type>
    <parameter>arg</parameter>
    <initializer>&null;</initializer>
   </methodparam>
  </methodsynopsis>
  <para>
   Adjust event connect listener&apos;s callback and optionally the callback
   argument.
  </para>
 </refsect1>
 <refsect1 role="parameters">
  &reftitle.parameters;
  <variablelist>
   <varlistentry>
    <term>
     <parameter>cb</parameter>
    </term>
    <listitem>
     <para>
      The new callback for new connections. Ignored if &null;.
     </para>
     <para>
      Should match the following prototype:
     </para>
     <methodsynopsis>
      <type>void</type>
      <methodname>callback</methodname>
      <methodparam
       choice="opt">
       <type>EventListener</type>
       <parameter>listener</parameter>
       <initializer>&null;</initializer>
      </methodparam>
      <methodparam
       choice="opt">
       <type>mixed</type>
       <parameter>fd</parameter>
       <initializer>&null;</initializer>
      </methodparam>
      <methodparam
       choice="opt">
       <type>array</type>
       <parameter>address</parameter>
       <initializer>&null;</initializer>
      </methodparam>
      <methodparam
       choice="opt">
       <type>mixed</type>
       <parameter>arg</parameter>
       <initializer>&null;</initializer>
      </methodparam>
     </methodsynopsis>
     <para>
      <variablelist>
       <varlistentry>
        <term>
         <parameter>listener</parameter>
        </term>
        <listitem>
         <para>
          The
          <classname>EventListener</classname>
          object.
         </para>
        </listitem>
       </varlistentry>
       <varlistentry>
        <term>
         <parameter>fd</parameter>
        </term>
        <listitem>
         <para>
          The file descriptor or a resource associated with the listener.
         </para>
        </listitem>
       </varlistentry>
       <varlistentry>
        <term>
         <parameter>address</parameter>
        </term>
        <listitem>
         <para>
          Array of two elements: IP address and the
          <emphasis>server</emphasis>
          port.
         </para>
        </listitem>
       </varlistentry>
       <varlistentry>
        <term>
         <parameter>arg</parameter>
        </term>
        <listitem>
         <para>
          User custom data attached to the callback.
         </para>
        </listitem>
       </varlistentry>
      </variablelist>
     </para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <parameter>arg</parameter>
    </term>
    <listitem>
     <para>
      Custom user data attached to the callback. Ignored if &null;.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>
 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   &return.void;
  </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
-->
