<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<phpdoc:classref xml:id="class.eventlistener" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
 <title>The EventListener class</title>
 <titleabbrev>EventListener</titleabbrev>
 <partintro>
<!-- {{{ EventListener intro -->
  <section xml:id="eventlistener.intro">
   &reftitle.intro;
   <para>
    Represents a connection listener.
   </para>
  </section>
<!-- }}} -->
  <section xml:id="eventlistener.synopsis">
   &reftitle.classsynopsis;

<!-- {{{ Synopsis -->
   <classsynopsis>
    <ooclass>
     <classname>EventListener</classname>
    </ooclass>
<!-- {{{ Class synopsis -->
    <classsynopsisinfo>
     <ooclass>
      <modifier>final</modifier>
      <classname>EventListener</classname>
     </ooclass>
    </classsynopsisinfo>
<!-- }}} -->
    <classsynopsisinfo role="comment">&Constants;</classsynopsisinfo>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>int</type>
     <varname linkend="eventlistener.constants.opt-leave-sockets-blocking">EventListener::OPT_LEAVE_SOCKETS_BLOCKING</varname>
     <initializer>1</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>int</type>
     <varname linkend="eventlistener.constants.opt-close-on-free">EventListener::OPT_CLOSE_ON_FREE</varname>
     <initializer>2</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>int</type>
     <varname linkend="eventlistener.constants.opt-close-on-exec">EventListener::OPT_CLOSE_ON_EXEC</varname>
     <initializer>4</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>int</type>
     <varname linkend="eventlistener.constants.opt-reuseable">EventListener::OPT_REUSEABLE</varname>
     <initializer>8</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>int</type>
     <varname linkend="eventlistener.constants.opt-threadsafe">EventListener::OPT_THREADSAFE</varname>
     <initializer>16</initializer>
    </fieldsynopsis>
    <classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
    <fieldsynopsis>
     <modifier>public</modifier>
     <modifier>readonly</modifier>
     <type>int</type>
     <varname linkend="eventlistener.props.fd">fd</varname>
    </fieldsynopsis>
    <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
    <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.eventlistener')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
   </classsynopsis>
<!-- }}} -->
  </section>
  <section xml:id="eventlistener.props">
   &reftitle.properties;
   <variablelist>
    <varlistentry xml:id="eventlistener.props.fd">
     <term>
      <varname>fd</varname>
     </term>
     <listitem>
      <para>
       Numeric file descriptor of the underlying socket. (Added in
       <literal>event-1.6.0</literal>
       .)
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </section>
<!-- {{{ EventListener constants -->
  <section xml:id="eventlistener.constants">
   &reftitle.constants;
   <variablelist>
    <varlistentry xml:id="eventlistener.constants.opt-leave-sockets-blocking">
     <term>
      <constant>EventListener::OPT_LEAVE_SOCKETS_BLOCKING</constant>
     </term>
     <listitem>
      <para>
       By default Libevent turns underlying file descriptors, or sockets, to
       non-blocking mode. This flag tells Libevent to leave them in blocking
       mode.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry xml:id="eventlistener.constants.opt-close-on-free">
     <term>
      <constant>EventListener::OPT_CLOSE_ON_FREE</constant>
     </term>
     <listitem>
      <para>
       If this option is set, the connection listener closes its underlying
       socket when the
       <classname>EventListener</classname>
       object is freed.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry xml:id="eventlistener.constants.opt-close-on-exec">
     <term>
      <constant>EventListener::OPT_CLOSE_ON_EXEC</constant>
     </term>
     <listitem>
      <para>
       If this option is set, the connection listener sets the close-on-exec
       flag on the underlying listener socket. See platform documentation for
       <literal>fcntl</literal>
       and
       <constant>FD_CLOEXEC</constant>
       for more information.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry xml:id="eventlistener.constants.opt-reuseable">
     <term>
      <constant>EventListener::OPT_REUSEABLE</constant>
     </term>
     <listitem>
      <para>
       By default on some platforms, once a listener socket is closed, no
       other socket can bind to the same port until a while has passed.
       Setting this option makes Libevent mark the socket as reusable, so that
       once it is closed, another socket can be opened to listen on the same
       port.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry xml:id="eventlistener.constants.opt-threadsafe">
     <term>
      <constant>EventListener::OPT_THREADSAFE</constant>
     </term>
     <listitem>
      <para>
       Allocate locks for the listener, so that it’s safe to use it from
       multiple threads.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </section>
<!-- }}} -->
 </partintro>

 &reference.event.entities.eventlistener;

</phpdoc:classref>
<!-- 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
-->
