timeout() public method

Note: A value of 0 may be used to specify an indefinite wait time.
public timeout ( integer $time ) : boolean
$time integer The timeout value in seconds
return boolean False if the resource handle is unavailable or the option could not be set, true otherwise.
コード例 #1
0
ファイル: CurlTest.php プロジェクト: niel/lithium
	public function testTimeout() {
		$stream = new Curl($this->_testConfig);
		$result = $stream->open();
		$stream->timeout(10);
		$result = $stream->resource();
		$this->assertTrue(is_resource($result));
	}
コード例 #2
0
ファイル: CurlTest.php プロジェクト: jianoll/lithium
 public function testTimeout()
 {
     $stream = new Curl($this->_testConfig);
     $result = $stream->open();
     $stream->timeout(10);
     $result = $stream->resource();
     $this->assertInternalType('resource', $result);
 }