<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.eventbuffer.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'eventbuffer.read.php',
    1 => 'EventBuffer::read',
    2 => 'Read data from an evbuffer and drain the bytes read',
  ),
  'up' => 
  array (
    0 => 'class.eventbuffer.php',
    1 => 'EventBuffer',
  ),
  'prev' => 
  array (
    0 => 'eventbuffer.pullup.php',
    1 => 'EventBuffer::pullup',
  ),
  'next' => 
  array (
    0 => 'eventbuffer.readfrom.php',
    1 => 'EventBuffer::readFrom',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/event/eventbuffer/read.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="eventbuffer.read" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">EventBuffer::read</h1>
  <p class="verinfo">(PECL event &gt;= 1.6.0)</p><p class="refpurpose"><span class="refname">EventBuffer::read</span> &mdash; <span class="dc-title">Read data from an evbuffer and drain the bytes read</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-eventbuffer.read-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="methodname"><strong>EventBuffer::read</strong></span>(<span class="methodparam">
    
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$max_bytes</code>
   </span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="para rdfs-comment">
   Read the first
   <code class="parameter">max_bytes</code>
   from the buffer and drain the bytes read. If more
   <code class="parameter">max_bytes</code>
   are requested than are available in the buffer, it only extracts as many
   bytes as available.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-eventbuffer.read-parameters">
  <h3 class="title">Параметри</h3>
  <dl>
   
    <dt>
     <code class="parameter">max_bytes</code>
    </dt>
    <dd>
     <p class="para">
      Maxmimum number of bytes to read from the buffer.
     </p>
    </dd>
   
  </dl>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-eventbuffer.read-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Returns string read, or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> on failure.
  </p>
 </div>

 <div class="refsect1 changelog" id="refsect1-eventbuffer.read-changelog">
  <h3 class="title">Журнал змін</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Версія</th>
       <th>Опис</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>PECL event 1.6.0</td>
       <td>
        Renamed <span class="methodname"><strong>EventBuffer::read()</strong></span>(the old method
        name) to <span class="methodname"><strong>EventBuffer::read()</strong></span>.
        <span class="methodname"><strong>EventBuffer::read()</strong></span> now takes only
        <code class="parameter">max_bytes</code> argument; returns string instead of
        integer.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-eventbuffer.read-seealso">
  <h3 class="title">Прогляньте також</h3>
  <ul class="simplelist">
   <li>
    <span class="methodname"><a href="eventbuffer.copyout.php" class="methodname" rel="rdfs-seeAlso">EventBuffer::copyout()</a> - Copies out specified number of bytes from the front of the buffer</span>
   </li>
   <li>
    <span class="methodname"><a href="eventbuffer.drain.php" class="methodname" rel="rdfs-seeAlso">EventBuffer::drain()</a> - Removes specified number of bytes from the front of the buffer
  without copying it anywhere</span>
   </li>
   <li>
    <span class="methodname"><a href="eventbuffer.pullup.php" class="methodname" rel="rdfs-seeAlso">EventBuffer::pullup()</a> - Linearizes data within buffer
  and returns it's contents as a string</span>
   </li>
   <li>
    <span class="methodname"><a href="eventbuffer.readline.php" class="methodname" rel="rdfs-seeAlso">EventBuffer::readLine()</a> - Extracts a line from the front of the buffer</span>
   </li>
   <li>
    <span class="methodname"><a href="eventbuffer.appendfrom.php" class="methodname" rel="rdfs-seeAlso">EventBuffer::appendFrom()</a> - Moves the specified number of bytes from a source buffer to the
  end of the current buffer</span>
   </li>
  </ul>
 </div>

</div><?php manual_footer($setup); ?>