1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
|
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 329925 $ -->
<phpdoc:classref xml:id="class.eventbuffer" 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 EventBuffer class</title>
<titleabbrev>EventBuffer</titleabbrev>
<partintro>
<!-- {{{ EventBuffer intro -->
<section xml:id="eventbuffer.intro">
&reftitle.intro;
<para>
<classname>EventBuffer</classname>
represents Libevent's "evbuffer", an utility functionality for buffered
I/O.
</para>
<para>
Event buffers are meant to be generally useful for doing the "buffer" part
of buffered network I/O.
</para>
</section>
<!-- }}} -->
<section xml:id="eventbuffer.synopsis">
&reftitle.classsynopsis;
<!-- {{{ Synopsis -->
<classsynopsis>
<ooclass>
<classname>EventBuffer</classname>
</ooclass>
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>EventBuffer</classname>
</ooclass>
</classsynopsisinfo>
<!-- }}} -->
<classsynopsisinfo role="comment">Constants</classsynopsisinfo>
<fieldsynopsis>
<modifier>const</modifier>
<type>integer</type>
<varname linkend="eventbuffer.constants.eol-any">EventBuffer::EOL_ANY</varname>
<initializer>0</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>integer</type>
<varname linkend="eventbuffer.constants.eol-crlf">EventBuffer::EOL_CRLF</varname>
<initializer>1</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>integer</type>
<varname linkend="eventbuffer.constants.eol-crlf-strict">EventBuffer::EOL_CRLF_STRICT</varname>
<initializer>2</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>integer</type>
<varname linkend="eventbuffer.constants.eol-lf">EventBuffer::EOL_LF</varname>
<initializer>3</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>integer</type>
<varname linkend="eventbuffer.constants.ptr-set">EventBuffer::PTR_SET</varname>
<initializer>0</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>integer</type>
<varname linkend="eventbuffer.constants.ptr-add">EventBuffer::PTR_ADD</varname>
<initializer>1</initializer>
</fieldsynopsis>
<classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>int</type>
<varname linkend="eventbuffer.props.length">length</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>int</type>
<varname linkend="eventbuffer.props.contiguous-space">contiguous_space</varname>
</fieldsynopsis>
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.eventbuffer')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
</classsynopsis>
<!-- }}} -->
</section>
<!-- {{{ EventBuffer properties -->
<section xml:id="eventbuffer.props">
&reftitle.properties;
<variablelist>
<varlistentry xml:id="eventbuffer.props.length">
<term>
<varname>length</varname>
</term>
<listitem>
<para>
The number of bytes stored in an event buffer.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="eventbuffer.props.contiguous-space">
<term>
<varname>contiguous_space</varname>
</term>
<listitem>
<para>
The number of bytes stored contiguously at the front of the buffer. The
bytes in a buffer may be stored in multiple separate chunks of memory;
the property returns the number of bytes currently stored in the first
chunk.
</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<!-- }}} -->
<!-- {{{ EventBuffer constants -->
<section xml:id="eventbuffer.constants">
&reftitle.constants;
<variablelist>
<varlistentry xml:id="eventbuffer.constants.eol-any">
<term>
<constant>EventBuffer::EOL_ANY</constant>
</term>
<listitem>
<para>
The end of line is any sequence of any number of carriage return and
linefeed characters. This format is not very useful; it exists mainly
for backward compatibility.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="eventbuffer.constants.eol-crlf">
<term>
<constant>EventBuffer::EOL_CRLF</constant>
</term>
<listitem>
<para>
The end of the line is an optional carriage return, followed by a
linefeed. (In other words, it is either a
<literal>"\r\n"</literal>
or a
<literal>"\n"</literal>
.) This format is useful in parsing text-based Internet protocols,
since the standards generally prescribe a
<literal>"\r\n"</literal>
line-terminator, but nonconformant clients sometimes say just
<literal>"\n"</literal>
.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="eventbuffer.constants.eol-crlf-strict">
<term>
<constant>EventBuffer::EOL_CRLF_STRICT</constant>
</term>
<listitem>
<para>
The end of a line is a single carriage return, followed by a single
linefeed. (This is also known as
<literal>"\r\n"</literal>
. The ASCII values are
<constant>0x0D</constant>
<constant>0x0A</constant>
).
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="eventbuffer.constants.eol-lf">
<term>
<constant>EventBuffer::EOL_LF</constant>
</term>
<listitem>
<para>
The end of a line is a single linefeed character. (This is also known
as
<literal>"\n"</literal>
. It is ASCII value is
<constant>0x0A</constant>
.)
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="eventbuffer.constants.ptr-set">
<term>
<constant>EventBuffer::PTR_SET</constant>
</term>
<listitem>
<para>
Flag used as argument of
<methodname>EventBuffer::setPosition</methodname>
method. If this flag specified, the position pointer is moved to an
absolute position within the buffer.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="eventbuffer.constants.ptr-add">
<term>
<constant>EventBuffer::PTR_ADD</constant>
</term>
<listitem>
<para>
The same as
<constant>EventBuffer::PTR_SET</constant>
, except this flag causes
<methodname>EventBuffer::setPosition</methodname>
method to move position forward up to the specified number of
bytes(instead of setting absolute position).
</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<!-- }}} -->
</partintro>
&reference.event.entities.eventbuffer;
</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
-->
|