public function initialize($hostname, $secure = false, $port = HTTPConnection::HTTP_PORT, $connectionTimeout = 0, $timeout = 0)
{
if ($this->initialized) {
$this->close();
}
$this->initialized = true;
$this->hostname = $hostname;
$this->secure = $secure === true;
if (func_num_args() == 2) {
$this->port = $this->secure ? HTTPConnection::HTTPS_PORT : HTTPConnection::HTTP_PORT;
} else {
$this->port = (int) $port;
}
$this->connectionTimeout = (int) $connectionTimeout;
$this->timeout = (int) $timeout;
}