<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<appendix xml:id="stream.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 &reftitle.constants;
 &extension.constants;
 <para>
  <informaltable>
   <tgroup cols="2">
    <thead>
     <row>
      <entry>Constant</entry>
      <entry>Description</entry>
     </row>
    </thead>
    <tbody>
     <row xml:id="constant.stream-filter-read">
      <entry><constant>STREAM_FILTER_READ</constant></entry>
      <entry>
       Used with <function>stream_filter_append</function> and
       <function>stream_filter_prepend</function> to indicate
       that the specified filter should only be applied when
       <emphasis>reading</emphasis>
      </entry>
     </row>
     <row xml:id="constant.stream-filter-write">
      <entry><constant>STREAM_FILTER_WRITE</constant></entry>
      <entry>
       Used with <function>stream_filter_append</function> and
       <function>stream_filter_prepend</function> to indicate
       that the specified filter should only be applied when
       <emphasis>writing</emphasis>
      </entry>
     </row>
     <row xml:id="constant.stream-filter-all">
      <entry><constant>STREAM_FILTER_ALL</constant></entry>
      <entry>
       This constant is equivalent to 
       <code>STREAM_FILTER_READ | STREAM_FILTER_WRITE</code>
      </entry>
     </row>
     <row xml:id="constant.psfs-pass-on">
      <entry><constant>PSFS_PASS_ON</constant></entry>
      <entry><literal>Return Code</literal> indicating that the
       userspace filter returned buckets in <parameter>$out</parameter>.
      </entry>
     </row>
     <row xml:id="constant.psfs-feed-me">
      <entry><constant>PSFS_FEED_ME</constant></entry>
      <entry><literal>Return Code</literal> indicating that the
       userspace filter did not return buckets in <parameter>$out</parameter>
       (i.e. No data available).
      </entry>
     </row>
     <row xml:id="constant.psfs-err-fatal">
      <entry><constant>PSFS_ERR_FATAL</constant></entry>
      <entry><literal>Return Code</literal> indicating that the
       userspace filter encountered an unrecoverable error
       (i.e. Invalid data received).
      </entry>
     </row>
     <row xml:id="constant.psfs-flag-normal">
      <entry><constant>PSFS_FLAG_NORMAL</constant></entry>
      <entry>Regular read/write.</entry>
     </row>
     <row xml:id="constant.psfs-flag-flush-inc">
      <entry><constant>PSFS_FLAG_FLUSH_INC</constant></entry>
      <entry>An incremental flush.</entry>
     </row>
     <row xml:id="constant.psfs-flag-flush-close">
      <entry><constant>PSFS_FLAG_FLUSH_CLOSE</constant></entry>
      <entry>Final flush prior to closing.</entry>
     </row>
     <row xml:id="constant.stream-use-path">
      <entry><constant>STREAM_USE_PATH</constant></entry>
      <entry><literal>Flag</literal> indicating if the <literal>stream</literal>
       used the include path.
      </entry>
     </row>
     <row xml:id="constant.stream-report-errors">
      <entry><constant>STREAM_REPORT_ERRORS</constant></entry>
      <entry><literal>Flag</literal> indicating if the <literal>wrapper</literal>
       is responsible for raising errors using <function>trigger_error</function> 
       during opening of the stream.  If this flag is not set, you
       should not raise any errors.
      </entry>
     </row>
     <row xml:id="constant.stream-client-async-connect">
      <entry><constant>STREAM_CLIENT_ASYNC_CONNECT</constant></entry>
      <entry>Open client socket asynchronously. This option must be used
       together with the <constant>STREAM_CLIENT_CONNECT</constant> flag.
       Used with <function>stream_socket_client</function>.
      </entry>
     </row>
     <row xml:id="constant.stream-client-connect">
      <entry><constant>STREAM_CLIENT_CONNECT</constant></entry>
      <entry>Open client socket connection. Client sockets should always
       include this flag. Used with <function>stream_socket_client</function>.
      </entry>
     </row>
     <row xml:id="constant.stream-client-persistent">
      <entry><constant>STREAM_CLIENT_PERSISTENT</constant></entry>
      <entry>Client socket opened with <function>stream_socket_client</function>
       should remain persistent between page loads.
      </entry>
     </row>
     <row xml:id="constant.stream-server-bind">
      <entry><constant>STREAM_SERVER_BIND</constant></entry>
      <entry>Tells a stream created with <function>stream_socket_server</function>
       to bind to the specified target.  Server sockets should always include this flag.
      </entry>
     </row>
     <row xml:id="constant.stream-server-listen">
      <entry><constant>STREAM_SERVER_LISTEN</constant></entry>
      <entry>Tells a stream created with <function>stream_socket_server</function>
       and bound using the <constant>STREAM_SERVER_BIND</constant> flag to start
       listening on the socket. Connection-orientated transports (such as TCP)
       must use this flag, otherwise the server socket will not be enabled.
       Using this flag for connect-less transports (such as UDP) is an error.
      </entry>
     </row>
     <row xml:id="constant.stream-notify-resolve">
      <entry><constant>STREAM_NOTIFY_RESOLVE</constant></entry>
      <entry>
       A remote address required for this stream has been resolved, or the resolution
       failed.  See <parameter>severity</parameter> for an indication of which happened.
      </entry>
     </row>
     <row xml:id="constant.stream-notify-connect">
      <entry><constant>STREAM_NOTIFY_CONNECT</constant></entry>
      <entry>
       A connection with an external resource has been established.
      </entry>
     </row>
     <row xml:id="constant.stream-notify-auth-required">
      <entry><constant>STREAM_NOTIFY_AUTH_REQUIRED</constant></entry>
      <entry>
       Additional authorization is required to access the specified resource.
       Typical issued with <parameter>severity</parameter> level of
       <constant>STREAM_NOTIFY_SEVERITY_ERR</constant>.
      </entry>
     </row>
     <row xml:id="constant.stream-notify-mime-type-is">
      <entry><constant>STREAM_NOTIFY_MIME_TYPE_IS</constant></entry>
      <entry>
       The <literal>mime-type</literal> of resource has been identified,
       refer to <parameter>message</parameter> for a description of the
       discovered type.
      </entry>
     </row>
     <row xml:id="constant.stream-notify-file-size-is">
      <entry><constant>STREAM_NOTIFY_FILE_SIZE_IS</constant></entry>
      <entry>
       The <literal>size</literal> of the resource has been discovered.
      </entry>
     </row>
     <row xml:id="constant.stream-notify-redirected">
      <entry><constant>STREAM_NOTIFY_REDIRECTED</constant></entry>
      <entry>
       The external resource has redirected the stream to an alternate
       location.  Refer to <parameter>message</parameter>.
      </entry>
     </row>
     <row xml:id="constant.stream-notify-progress">
      <entry><constant>STREAM_NOTIFY_PROGRESS</constant></entry>
      <entry>
       Indicates current progress of the stream transfer in
       <parameter>bytes_transferred</parameter> and possibly
       <parameter>bytes_max</parameter> as well.
      </entry>
     </row>
     <row xml:id="constant.stream-notify-completed">
      <entry><constant>STREAM_NOTIFY_COMPLETED</constant></entry>
      <entry>
       There is no more data available on the stream.
      </entry>
     </row>
     <row xml:id="constant.stream-notify-failure">
      <entry><constant>STREAM_NOTIFY_FAILURE</constant></entry>
      <entry>
       A generic error occurred on the stream, consult
       <parameter>message</parameter> and <parameter>message_code</parameter>
       for details.
      </entry>
     </row>
     <row xml:id="constant.stream-notify-auth-result">
      <entry><constant>STREAM_NOTIFY_AUTH_RESULT</constant></entry>
      <entry>
       Authorization has been completed (with or without success).
      </entry>
     </row>
     <row xml:id="constant.stream-notify-severity-info">
      <entry><constant>STREAM_NOTIFY_SEVERITY_INFO</constant></entry>
      <entry>
       Normal, non-error related, notification.
      </entry>
     </row>
     <row xml:id="constant.stream-notify-severity-warn">
      <entry><constant>STREAM_NOTIFY_SEVERITY_WARN</constant></entry>
      <entry>
       Non critical error condition.  Processing may continue.
      </entry>
     </row>
     <row xml:id="constant.stream-notify-severity-err">
      <entry><constant>STREAM_NOTIFY_SEVERITY_ERR</constant></entry>
      <entry>
       A critical error occurred.  Processing cannot continue.
      </entry>
     </row>
     <row xml:id="constant.stream-ipproto-icmp">
      <entry><constant>STREAM_IPPROTO_ICMP</constant> +</entry>
      <entry>
       Provides a ICMP socket.
      </entry>
     </row>
     <row xml:id="constant.stream-ipproto-ip">
      <entry><constant>STREAM_IPPROTO_IP</constant> +</entry>
      <entry>
       Provides a IP socket.
      </entry>
     </row>
     <row xml:id="constant.stream-ipproto-raw">
      <entry><constant>STREAM_IPPROTO_RAW</constant> +</entry>
      <entry>
       Provides a RAW socket.
      </entry>
     </row>
     <row xml:id="constant.stream-ipproto-tcp">
      <entry><constant>STREAM_IPPROTO_TCP</constant> +</entry>
      <entry>
       Provides a TCP socket.
      </entry>
     </row>
     <row xml:id="constant.stream-ipproto-udp">
      <entry><constant>STREAM_IPPROTO_UDP</constant> +</entry>
      <entry>
       Provides a UDP socket.
      </entry>
     </row>
     <row xml:id="constant.stream-pf-inet">
      <entry><constant>STREAM_PF_INET</constant> +</entry>
      <entry>
       Internet Protocol Version 4 (IPv4).
      </entry>
     </row>
     <row xml:id="constant.stream-pf-inet6">
      <entry><constant>STREAM_PF_INET6</constant> +</entry>
      <entry>
       Internet Protocol Version 6 (IPv6).
      </entry>
     </row>
     <row xml:id="constant.stream-pf-unix">
      <entry><constant>STREAM_PF_UNIX</constant> +</entry>
      <entry>
       Unix system internal protocols.
      </entry>
     </row>
     <row xml:id="constant.stream-sock-dgram">
      <entry><constant>STREAM_SOCK_DGRAM</constant> +</entry>
      <entry>
       Provides datagrams, which are connectionless messages (UDP, for
       example).
      </entry>
     </row>
     <row xml:id="constant.stream-sock-raw">
      <entry><constant>STREAM_SOCK_RAW</constant> +</entry>
      <entry>
       Provides a raw socket, which provides access to internal network
       protocols and interfaces. Usually this type of socket is just available
       to the root user.
      </entry>
     </row>
     <row xml:id="constant.stream-sock-rdm">
      <entry><constant>STREAM_SOCK_RDM</constant> +</entry>
      <entry>
       Provides a RDM (Reliably-delivered messages) socket.
      </entry>
     </row>
     <row xml:id="constant.stream-sock-seqpacket">
      <entry><constant>STREAM_SOCK_SEQPACKET</constant> +</entry>
      <entry>
       Provides a sequenced packet stream socket.
      </entry>
     </row>
     <row xml:id="constant.stream-sock-stream">
      <entry><constant>STREAM_SOCK_STREAM</constant> +</entry>
      <entry>
       Provides sequenced, two-way byte streams with a transmission mechanism
       for out-of-band data (TCP, for example).
      </entry>
     </row>
     <row xml:id="constant.stream-shut-rd">
      <entry><constant>STREAM_SHUT_RD</constant></entry>
      <entry>
       Used with <function>stream_socket_shutdown</function> to disable
       further receptions.
      </entry>
     </row>
     <row xml:id="constant.stream-shut-wr">
      <entry><constant>STREAM_SHUT_WR</constant></entry>
      <entry>
       Used with <function>stream_socket_shutdown</function> to disable
       further transmissions.
      </entry>
     </row>
     <row xml:id="constant.stream-shut-rdwr">
      <entry><constant>STREAM_SHUT_RDWR</constant></entry>
      <entry>
       Used with <function>stream_socket_shutdown</function> to disable
       further receptions and transmissions.
      </entry>
     </row>
     <row xml:id="constant.stream-cast-for-select">
      <entry><constant>STREAM_CAST_FOR_SELECT</constant></entry>
      <entry>
       Stream casting, for when <function>stream_select</function> is 
       calling <function>stream_cast</function>.
      </entry>
     </row>
     <row xml:id="constant.stream-cast-as-stream">
      <entry><constant>STREAM_CAST_AS_STREAM</constant></entry>
      <entry>
       Stream casting, when <function>stream_cast</function> is called 
       otherwise (see above).
      </entry>
     </row>
     <row xml:id="constant.stream-meta-touch">
      <entry><constant>STREAM_META_TOUCH</constant></entry>
      <entry>
       Used with <function>stream_metadata</function>, to specify <function>touch</function> call.
      </entry>
     </row>
     <row xml:id="constant.stream-meta-owner">
      <entry><constant>STREAM_META_OWNER</constant></entry>
      <entry>
       Used with <function>stream_metadata</function>, to specify <function>chown</function> call.
      </entry>
     </row>
     <row xml:id="constant.stream-meta-owner-name">
      <entry><constant>STREAM_META_OWNER_NAME</constant></entry>
      <entry>
       Used with <function>stream_metadata</function>, to specify <function>chown</function> call.
      </entry>
     </row>
     <row xml:id="constant.stream-meta-group">
      <entry><constant>STREAM_META_GROUP</constant></entry>
      <entry>
       Used with <function>stream_metadata</function>, to specify <function>chgrp</function> call.
      </entry>
     </row>
     <row xml:id="constant.stream-meta-group-name">
      <entry><constant>STREAM_META_GROUP_NAME</constant></entry>
      <entry>
       Used with <function>stream_metadata</function>, to specify <function>chgrp</function> call.
      </entry>
     </row>
     <row xml:id="constant.stream-meta-access">
      <entry><constant>STREAM_META_ACCESS</constant></entry>
      <entry>
       Used with <function>stream_metadata</function>, to specify <function>chmod</function> call.
      </entry>
     </row>
     <row xml:id="constant.stream-buffer-none">
      <entry><constant>STREAM_BUFFER_NONE</constant></entry>
      <entry>
       No buffering.
      </entry>
     </row>
     <row xml:id="constant.stream-buffer-line">
      <entry><constant>STREAM_BUFFER_LINE</constant></entry>
      <entry>
       Line buffering.
      </entry>
     </row>
     <row xml:id="constant.stream-buffer-full">
      <entry><constant>STREAM_BUFFER_FULL</constant></entry>
      <entry>
       Full buffering.
      </entry>
     </row>
    </tbody>
   </tgroup>
  </informaltable>
 </para>
 <note>
  <simpara>
   The constants marked with <literal>+</literal> are meant to be used with
   <function>stream_socket_pair</function>. Please note that some of these
   constants might not be available in your system.
  </simpara>
 </note>
 <note>
  <simpara>
   The <constant>STREAM_META_*</constant> constants 
   are meant to be used with <function>stream_metadata</function>. 
  </simpara>
 </note>
</appendix>

<!-- 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
-->

