<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.yar-server.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'yar-server.handle.php',
    1 => 'Yar_Server::handle',
    2 => 'Start RPC Server',
  ),
  'up' => 
  array (
    0 => 'class.yar-server.php',
    1 => 'Yar_Server',
  ),
  'prev' => 
  array (
    0 => 'yar-server.construct.php',
    1 => 'Yar_Server::__construct',
  ),
  'next' => 
  array (
    0 => 'class.yar-client.php',
    1 => 'Yar_Client',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/yar/yar_server/handle.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="yar-server.handle" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Yar_Server::handle</h1>
  <p class="verinfo">(PECL yar &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">Yar_Server::handle</span> &mdash; <span class="dc-title">Start RPC Server</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-yar-server.handle-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Yar_Server::handle</strong></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Start a RPC HTTP server, and ready for accpet RPC requests.
   <blockquote class="note"><p><strong class="note">Note</strong>: 
    <p class="para">
     Usual RPC calls will be issued as HTTP POST requests. If a HTTP GET
     request is issued to the uri, the service information (commented section
     above) will be printed on the page
    </p>
   </p></blockquote>
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-yar-server.handle-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">This function has no parameters.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-yar-server.handle-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   boolean
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-yar-server.handle-examples">
  <h3 class="title">Examples</h3>
  <div class="example" id="example-1">
   <p><strong>Example #1 <span class="function"><strong>Yar_Server::handle()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">class </span><span style="color: #0000BB">API </span><span style="color: #007700">{<br />    </span><span style="color: #FF8000">/**<br />     * the doc info will be generated automatically into service info page.<br />     * @params <br />     * @return<br />     */<br />    </span><span style="color: #007700">public function </span><span style="color: #0000BB">some_method</span><span style="color: #007700">(</span><span style="color: #0000BB">$parameter</span><span style="color: #007700">, </span><span style="color: #0000BB">$option </span><span style="color: #007700">= </span><span style="color: #DD0000">"foo"</span><span style="color: #007700">) {<br />    }<br /><br />    protected function </span><span style="color: #0000BB">client_can_not_see</span><span style="color: #007700">() {<br />    }<br />}<br /><br /></span><span style="color: #0000BB">$service </span><span style="color: #007700">= new </span><span style="color: #0000BB">Yar_Server</span><span style="color: #007700">(new </span><span style="color: #0000BB">API</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">$service</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">handle</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>The above example will output
something similar to:</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode"></pre>
</div>
   </div>
  </div>
 </div>



 <div class="refsect1 seealso" id="refsect1-yar-server.handle-seealso">
  <h3 class="title">See Also</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="yar-server.construct.php" class="methodname" rel="rdfs-seeAlso">Yar_Server::__construct()</a> - Register a server</span></li>
  </ul>
 </div>


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