<!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>The EventHttpConnection class</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="eventhttp.settimeout.html">EventHttp::setTimeout</a></div> <div class="next" style="text-align: right; float: right;"><a href="eventhttpconnection.construct.html">EventHttpConnection::__construct</a></div> <div class="up"><a href="book.event.html">Event</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="class.eventhttpconnection" class="reference"> <h1 class="title">The EventHttpConnection class</h1> <div class="partintro"><p class="verinfo">(PECL event >= 1.4.0-beta)</p> <div class="section" id="eventhttpconnection.intro"> <h2 class="title">Introduction</h2> <p class="para"> Represents an HTTP connection. </p> </div> <div class="section" id="eventhttpconnection.synopsis"> <h2 class="title">Class synopsis</h2> <div class="classsynopsis"> <div class="ooclass"> </div> <div class="classsynopsisinfo"> <span class="ooclass"> <strong class="classname">EventHttpConnection</strong> </span> {</div> <div class="classsynopsisinfo classsynopsisinfo_comment">/* Methods */</div> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="methodname"><a href="eventhttpconnection.construct.html" class="methodname">__construct</a></span> ( <span class="methodparam"> <span class="type"><a href="class.eventbase.html" class="type EventBase">EventBase</a></span> <code class="parameter">$base</code> </span> , <span class="methodparam"> <span class="type"><a href="class.eventdnsbase.html" class="type EventDnsBase">EventDnsBase</a></span> <code class="parameter">$dns_base</code> </span> , <span class="methodparam"> <span class="type">string</span> <code class="parameter">$address</code> </span> , <span class="methodparam"> <span class="type">int</span> <code class="parameter">$port</code> </span> )</div> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">EventBase</span> <span class="methodname"><a href="eventhttpconnection.getbase.html" class="methodname">getBase</a></span> ( <span class="methodparam">void</span> )</div> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">void</span> <span class="methodname"><a href="eventhttpconnection.getpeer.html" class="methodname">getPeer</a></span> ( <span class="methodparam"> <span class="type">string</span> <code class="parameter reference">&$address</code> </span> , <span class="methodparam"> <span class="type">int</span> <code class="parameter reference">&$port</code> </span> )</div> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">bool</span> <span class="methodname"><a href="eventhttpconnection.makerequest.html" class="methodname">makeRequest</a></span> ( <span class="methodparam"> <span class="type"><a href="class.eventhttprequest.html" class="type EventHttpRequest">EventHttpRequest</a></span> <code class="parameter">$req</code> </span> , <span class="methodparam"> <span class="type">int</span> <code class="parameter">$type</code> </span> , <span class="methodparam"> <span class="type">string</span> <code class="parameter">$uri</code> </span> )</div> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">void</span> <span class="methodname"><a href="eventhttpconnection.setclosecallback.html" class="methodname">setCloseCallback</a></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"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$data</code> </span> ] )</div> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">void</span> <span class="methodname"><a href="eventhttpconnection.setlocaladdress.html" class="methodname">setLocalAddress</a></span> ( <span class="methodparam"> <span class="type">string</span> <code class="parameter">$address</code> </span> )</div> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">void</span> <span class="methodname"><a href="eventhttpconnection.setlocalport.html" class="methodname">setLocalPort</a></span> ( <span class="methodparam"> <span class="type">int</span> <code class="parameter">$port</code> </span> )</div> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">void</span> <span class="methodname"><a href="eventhttpconnection.setmaxbodysize.html" class="methodname">setMaxBodySize</a></span> ( <span class="methodparam"> <span class="type">string</span> <code class="parameter">$max_size</code> </span> )</div> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">void</span> <span class="methodname"><a href="eventhttpconnection.setmaxheaderssize.html" class="methodname">setMaxHeadersSize</a></span> ( <span class="methodparam"> <span class="type">string</span> <code class="parameter">$max_size</code> </span> )</div> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">void</span> <span class="methodname"><a href="eventhttpconnection.setretries.html" class="methodname">setRetries</a></span> ( <span class="methodparam"> <span class="type">int</span> <code class="parameter">$retries</code> </span> )</div> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">void</span> <span class="methodname"><a href="eventhttpconnection.settimeout.html" class="methodname">setTimeout</a></span> ( <span class="methodparam"> <span class="type">int</span> <code class="parameter">$timeout</code> </span> )</div> }</div> </div> </div> <h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="eventhttpconnection.construct.html">EventHttpConnection::__construct</a> — Constructs EventHttpConnection object</li><li><a href="eventhttpconnection.getbase.html">EventHttpConnection::getBase</a> — Returns event base associated with the connection</li><li><a href="eventhttpconnection.getpeer.html">EventHttpConnection::getPeer</a> — Gets the remote address and port associated with the connection</li><li><a href="eventhttpconnection.makerequest.html">EventHttpConnection::makeRequest</a> — Makes an HTTP request over the specified connection</li><li><a href="eventhttpconnection.setclosecallback.html">EventHttpConnection::setCloseCallback</a> — Set callback for connection close</li><li><a href="eventhttpconnection.setlocaladdress.html">EventHttpConnection::setLocalAddress</a> — Sets the IP address from which HTTP connections are made</li><li><a href="eventhttpconnection.setlocalport.html">EventHttpConnection::setLocalPort</a> — Sets the local port from which connections are made</li><li><a href="eventhttpconnection.setmaxbodysize.html">EventHttpConnection::setMaxBodySize</a> — Sets maximum body size for the connection</li><li><a href="eventhttpconnection.setmaxheaderssize.html">EventHttpConnection::setMaxHeadersSize</a> — Sets maximum header size</li><li><a href="eventhttpconnection.setretries.html">EventHttpConnection::setRetries</a> — Sets the retry limit for the connection</li><li><a href="eventhttpconnection.settimeout.html">EventHttpConnection::setTimeout</a> — Sets the timeout for the connection</li></ul> </div> <hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="eventhttp.settimeout.html">EventHttp::setTimeout</a></div> <div class="next" style="text-align: right; float: right;"><a href="eventhttpconnection.construct.html">EventHttpConnection::__construct</a></div> <div class="up"><a href="book.event.html">Event</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>