<?xml version="1.0"?>
<page xmlns="http://projectmallard.org/1.0/"
      type="topic"
      style="function"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/experimental/ui/"
      id="mongoc_gridfs_file_readv">
  <info>
    <link type="guide" xref="mongoc_gridfs_file_t" group="function"/>
  </info>
  <title>mongoc_gridfs_file_readv()</title>

  <section id="synopsis">
    <title>Synopsis</title>
    <synopsis><code mime="text/x-csrc"><![CDATA[ssize_t
mongoc_gridfs_file_readv (mongoc_gridfs_file_t *file,
                          mongoc_iovec_t       *iov,
                          size_t                iovcnt,
                          size_t                min_bytes,
                          uint32_t              timeout_msec);
]]></code></synopsis>
  </section>


  <section id="parameters">
    <title>Parameters</title>
    <table>
      <tr><td><p>file</p></td><td><p>A <link xref="mongoc_gridfs_file_t">mongoc_gridfs_file_t</link>.</p></td></tr>
      <tr><td><p>iov</p></td><td><p>An array of <link xref="mongoc_iovec_t">mongoc_iovec_t</link>.</p></td></tr>
      <tr><td><p>iovcnt</p></td><td><p>The number of elements in <code>iov</code>.</p></td></tr>
      <tr><td><p>min_bytes</p></td><td><p>The minimum number of bytes that must be read or an error will be synthesized.</p></td></tr>
      <tr><td><p>timeout_msec</p></td><td><p>A uint32_t with the timeout in milliseconds.</p></td></tr>
    </table>
  </section>

  <section id="description">
    <title>Description</title>
    <p>This function performs a scattered read from <code>file</code>, potentially blocking to read from the MongoDB server.</p>
    <p>Timeout should be the number of milliseconds to allow blocking, or 0 to disallow blocking.</p>
  </section>

  <section id="return">
    <title>Returns</title>
    <p>Returns the number of bytes read, or -1 on failure and errno is set.</p>
  </section>

</page>
