public function timeout($time) { if (!is_resource($this->_resource)) { return false; } return curl_setopt($this->_resource, CURLOPT_CONNECTTIMEOUT, $time); }
public function testTimeout() { $stream = new Curl($this->_testConfig); $result = $stream->open(); $stream->timeout(10); $result = $stream->resource(); $this->assertTrue(is_resource($result)); }