Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 2720

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Transfer data between file descriptors</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.eio-seek.html">eio_seek</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.eio-set-max-idle.html">eio_set_max_idle</a></div>
 <div class="up"><a href="ref.eio.html">Eio Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.eio-sendfile" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">eio_sendfile</h1>
  <p class="verinfo">(PECL eio &gt;= 0.0.1dev)</p><p class="refpurpose"><span class="refname">eio_sendfile</span> &mdash; <span class="dc-title">Transfer data between file descriptors</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.eio-sendfile-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">resource</span> <span class="methodname"><strong>eio_sendfile</strong></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$out_fd</code></span>
   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$in_fd</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$offset</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$length</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$pri</code></span>
   [, <span class="methodparam"><span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span> <code class="parameter">$callback</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$data</code></span>
  ]]] )</div>

  <p class="para rdfs-comment">
    <span class="function"><strong>eio_sendfile()</strong></span> copies  data between one file descriptor
   and another. See <em>SENDFILE(2)</em> man page for details.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.eio-sendfile-parameters">
  <h3 class="title">Parameters</h3>
  <dl>

   <dt>

    <span class="term"><em><code class="parameter">out_fd</code></em></span>
    <dd>

     <p class="para">
     Output stream, Socket resource, or file descriptor. Should be opened for writing.
     </p>
    </dd>

   </dt>

   <dt>

    <span class="term"><em><code class="parameter">in_fd</code></em></span>
    <dd>

     <p class="para">
     Input stream, Socket resource, or file descriptor. Should be opened for reading.
     </p>
    </dd>

   </dt>

   <dt>

    <span class="term"><em><code class="parameter">offset</code></em></span>
    <dd>

     <p class="para">
     Offset within the source file.
     </p>
    </dd>

   </dt>

   <dt>

    <span class="term"><em><code class="parameter">length</code></em></span>
    <dd>

     <p class="para">
     Number of bytes to copy.
     </p>
    </dd>

   </dt>

   <dt>

    <span class="term"><em><code class="parameter">pri</code></em></span>
    <dd>

    <p class="para">The request priority: <strong><code>EIO_PRI_DEFAULT</code></strong>, <strong><code>EIO_PRI_MIN</code></strong>, <strong><code>EIO_PRI_MAX</code></strong>, or <strong><code>NULL</code></strong>.
If <strong><code>NULL</code></strong> passed, <em><code class="parameter">pri</code></em> internally is set to
<strong><code>EIO_PRI_DEFAULT</code></strong>.
</p>

    </dd>

   </dt>

   <dt>

    <span class="term"><em><code class="parameter">callback</code></em></span>
    <dd>

     <p class="para">
<em><code class="parameter">callback</code></em> function is called when the request is done.
It should match the following prototype: <div class="example-contents"><div class="phpcode"><code><span style="color: #000000">
void&nbsp;callback(mixed&nbsp;$data,&nbsp;int&nbsp;$result[,&nbsp;resource&nbsp;$req]);</span>
</code></div></div>

<dl>

<dt>

<span class="term"><em><code class="parameter">data</code></em></span>
<dd>
<p class="para">is custom data passed to the request.</p></dd>

</dt>

<dt>

<span class="term"><em><code class="parameter">result</code></em></span>
<dd>
<p class="para">request-specific result value; basically, the value returned by corresponding
system call.</p></dd>

</dt>

<dt>

<span class="term"><em><code class="parameter">req</code></em></span>
<dd>
<p class="para">is optional request resource which can be used with functions like  <span class="function"><a href="function.eio-get-last-error.html" class="function">eio_get_last_error()</a></span></p></dd>

</dt>

</dl>

</p>

    </dd>

   </dt>

   <dt>

    <span class="term"><em><code class="parameter">data</code></em></span>
    <dd>

     <p class="para">
     Arbitrary variable passed to <em><code class="parameter">callback</code></em>.
     </p>
    </dd>

   </dt>

  </dl>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.eio-sendfile-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
    <span class="function"><strong>eio_sendfile()</strong></span> returns request resource on success or <strong><code>FALSE</code></strong> on error.
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.eio-seek.html">eio_seek</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.eio-set-max-idle.html">eio_set_max_idle</a></div>
 <div class="up"><a href="ref.eio.html">Eio Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>