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.
Exemplo n.º 1
0
	public function testTimeout() {
		$stream = new Curl($this->_testConfig);
		$result = $stream->open();
		$stream->timeout(10);
		$result = $stream->resource();
		$this->assertTrue(is_resource($result));
	}
Exemplo n.º 2
0
 public function testTimeout()
 {
     $stream = new Curl($this->_testConfig);
     $result = $stream->open();
     $stream->timeout(10);
     $result = $stream->resource();
     $this->assertInternalType('resource', $result);
 }