# EventHttpConnection::__construct

(PECL event >= 1.2.6-beta)

EventHttpConnection::__construct — Constructs EventHttpConnection object

### Description

public EventHttpConnection::__construct ( EventBase `$base` , EventDnsBase `$dns_base` , string `$address` , int `$port` [, EventSslContext `$ctx` = `NULL` ] )

Constructs EventHttpConnection object.

### Parameters

`base`

  Associated event base.

`dns_base`

  If `dns_base` is `NULL`, hostname resolution will block.

`address`

  The address to connect to.

`port`

  The port to connect to.

`ctx`

  EventSslContext class object. Enables OpenSSL.

  > Note:

  > This parameter is available only if Event is compiled with OpenSSL support and only with Libevent 2.1.0-alpha and higher.

### Return Values

Returns EventHttpConnection object.

### Changelog

Version | Description
--- | ---
1.9.0 | OpenSSL support (`ctx`) added.