<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.yaz.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.yaz-wait.php',
    1 => 'yaz_wait',
    2 => 'Wait for Z39.50 requests to complete',
  ),
  'up' => 
  array (
    0 => 'ref.yaz.php',
    1 => 'YAZ 函数',
  ),
  'prev' => 
  array (
    0 => 'function.yaz-syntax.php',
    1 => 'yaz_syntax',
  ),
  'next' => 
  array (
    0 => 'book.zmq.php',
    1 => '0MQ 消息',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/yaz/functions/yaz-wait.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.yaz-wait" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">yaz_wait</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.1, PECL yaz &gt;= 0.9.0)</p><p class="refpurpose"><span class="refname">yaz_wait</span> &mdash; <span class="dc-title">Wait for Z39.50 requests to complete</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.yaz-wait-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>yaz_wait</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.array.php" class="type array">array</a></span> <code class="parameter reference">&$options</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span></div>

  <p class="para rdfs-comment">
   This function carries out networked (blocked) activity for outstanding
   requests which have been prepared by the functions 
   <span class="function"><a href="function.yaz-connect.php" class="function">yaz_connect()</a></span>, <span class="function"><a href="function.yaz-search.php" class="function">yaz_search()</a></span>, 
   <span class="function"><a href="function.yaz-present.php" class="function">yaz_present()</a></span>, <span class="function"><a href="function.yaz-scan.php" class="function">yaz_scan()</a></span> and 
   <span class="function"><a href="function.yaz-itemorder.php" class="function">yaz_itemorder()</a></span>.
  </p>
  <p class="para">
   <span class="function"><strong>yaz_wait()</strong></span> returns when all servers have either
   completed all requests or aborted (in case of errors).
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.yaz-wait-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">options</code></dt>
     <dd>
      <p class="para">
       An associative array of options:
       <dl>
        
         <dt><code class="literal">timeout</code></dt>
         <dd>
          <p class="para">
           Sets timeout in seconds. If a server has not responded within the
           timeout it is considered dead and <span class="function"><strong>yaz_wait()</strong></span>
           returns. The default value for timeout is 15 seconds.
          </p>
         </dd>
        
        
         <dt><code class="literal">event</code></dt>
         <dd>
          <p class="para">
           A boolean.
          </p>
         </dd>
        
       </dl>
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.yaz-wait-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>， 或者在失败时返回 <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>。
   In event mode, returns resource  或者在失败时返回 <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
  </p>
 </div>

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