<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.eventhttprequest.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'eventhttprequest.getconnection.php',
    1 => 'EventHttpRequest::getConnection',
    2 => 'Returns EventHttpConnection object',
  ),
  'up' => 
  array (
    0 => 'class.eventhttprequest.php',
    1 => 'EventHttpRequest',
  ),
  'prev' => 
  array (
    0 => 'eventhttprequest.getcommand.php',
    1 => 'EventHttpRequest::getCommand',
  ),
  'next' => 
  array (
    0 => 'eventhttprequest.gethost.php',
    1 => 'EventHttpRequest::getHost',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/event/eventhttprequest/getconnection.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="eventhttprequest.getconnection" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">EventHttpRequest::getConnection</h1>
  <p class="verinfo">(PECL event &gt;= 1.8.0)</p><p class="refpurpose"><span class="refname">EventHttpRequest::getConnection</span> &mdash; <span class="dc-title">Returns EventHttpConnection object</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-eventhttprequest.getconnection-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="methodname"><a href="eventhttprequest.closeconnection.php" class="methodname">EventHttpRequest::closeConnection</a></span>(): <span class="type"><a href="class.eventhttpconnection.php" class="type EventHttpConnection">EventHttpConnection</a></span></div>

  <p class="para rdfs-comment">
   Returns
   <span class="classname"><a href="class.eventhttpconnection.php" class="classname">EventHttpConnection</a></span>
   object which represents HTTP connection associated with the request.
  </p>
  <div class="warning"><strong class="warning">Warning</strong>
   <p class="para">
    Libevent API allows HTTP request objects to be not bound to any HTTP
    connection. Therefore we can&#039;t unambiguously associate
    <span class="classname"><a href="class.eventhttprequest.php" class="classname">EventHttpRequest</a></span>
    with
    <span class="classname"><a href="class.eventhttpconnection.php" class="classname">EventHttpConnection</a></span>.
    Thus, we construct
    <span class="classname"><a href="class.eventhttpconnection.php" class="classname">EventHttpConnection</a></span>
    object on-the-fly. Having no information about the event base, DNS base
    and connection-close callback, we just leave these fields unset.
   </p>
  </div>
  <p class="para">
   <span class="methodname"><strong>EventHttpRequest::getConnection()</strong></span>
   method is usually useful when we need to set up a callback on connection
   close. See
   <span class="methodname"><a href="eventhttpconnection.setclosecallback.php" class="methodname">EventHttpConnection::setCloseCallback()</a></span>.
  </p>
 </div>

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

 <div class="refsect1 returnvalues" id="refsect1-eventhttprequest.getconnection-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns
   <span class="classname"><a href="class.eventhttpconnection.php" class="classname">EventHttpConnection</a></span>
   object.
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-eventhttprequest.getconnection-seealso">
  <h3 class="title">See Also</h3>
  <ul class="simplelist">
   <li>
    <span class="methodname"><a href="eventhttpconnection.setclosecallback.php" class="methodname" rel="rdfs-seeAlso">EventHttpConnection::setCloseCallback()</a> - Set callback for connection close</span>
   </li>
   <li>
    <span class="methodname"><a href="eventhttprequest.getbufferevent.php" class="methodname" rel="rdfs-seeAlso">EventHttpRequest::getBufferEvent()</a> - Returns EventBufferEvent object</span>
   </li>
  </ul>
 </div>

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