lithium\analysis\logger\adapter\Growl::_connection()

protected method

Creates a connection to the Growl server using the protocol, host and port configurations specified in the constructor.

Returns

resource

Returns a connection resource created by fsockopen().

Source

	protected function _connection() {
		if ($this->_connection) {
			return $this->_connection;
		}
		$host = "{$this->_config['protocol']}://{$this->_config['host']}";

		if ($this->_connection = fsockopen($host, $this->_config['port'], $message, $code)) {
			return $this->_connection;
		}
		throw new NetworkException("Growl connection failed: (`{$code}`) `{$message}`.");
	}