lithium\net\socket\Curl::timeout()

public method

A convenience method to set the curl CURLOPT_CONNECTTIMEOUT setting for the current connection. This determines the number of seconds to wait while trying to connect.

Note: A value of 0 may be used to specify an indefinite wait time.

Parameters

  • integer $time

    The timeout value in seconds

Returns

boolean

False if the resource handle is unavailable or the option could not be set, true otherwise.

Source

	public function timeout($time) {
		if (!is_resource($this->_resource)) {
			return false;
		}
		return curl_setopt($this->_resource, CURLOPT_CONNECTTIMEOUT, $time);
	}