public function connect($host, $port, $secure = false)
    {
        $this->connectionError = '';
        $this->connectionErrorNo = 0;

        $host = $secure ? 'ssl://' . $host : $host;

        $this->socket = fsockopen(
            $host,
            $port,
            $this->connectionErrorNo,
            $this->connectionError,
            $this->connectionTimeout
        );

        if (!$this->socket) {
            return false;
        }

        socket_set_blocking($this->socket, $this->blocking);
        stream_set_timeout($this->socket, $this->readTimeout);

        return true;
    }
public function connect($host, $port, $secure = false)
    {
        $this->connectionError = '';
        $this->connectionErrorNo = 0;

        $host = $secure ? 'ssl://' . $host : $host;

        $this->socket = fsockopen(
            $host,
            $port,
            $this->connectionErrorNo,
            $this->connectionError,
            $this->connectionTimeout
        );

        if (!$this->socket) {
            return false;
        }

        socket_set_blocking($this->socket, $this->blocking);
        stream_set_timeout($this->socket, $this->readTimeout);

        return true;
    }
{@inheritDoc}

@param string  $host
@param string  $port
@param boolean $secure

@return boolean