mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-04 02:28:06 +01:00
Merge branch '1.0' into 2.0
This commit is contained in:
commit
7ce104b12c
@ -2860,6 +2860,16 @@ class SSH2
|
|||||||
return $this->_disconnect(NET_SSH2_DISCONNECT_BY_APPLICATION);
|
return $this->_disconnect(NET_SSH2_DISCONNECT_BY_APPLICATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the currently configured timeout
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
function getTimeout()
|
||||||
|
{
|
||||||
|
return $this->timeout;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set Timeout
|
* Set Timeout
|
||||||
*
|
*
|
||||||
|
@ -110,6 +110,16 @@ class Unit_Net_SSH2UnitTest extends PhpseclibTestCase
|
|||||||
$this->assertFalse($ssh->isQuietModeEnabled());
|
$this->assertFalse($ssh->isQuietModeEnabled());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testGetTimeout()
|
||||||
|
{
|
||||||
|
$ssh = new Net_SSH2('localhost');
|
||||||
|
$this->assertEquals(10, $ssh->getTimeout());
|
||||||
|
$ssh->setTimeout(0);
|
||||||
|
$this->assertEquals(0, $ssh->getTimeout());
|
||||||
|
$ssh->setTimeout(20);
|
||||||
|
$this->assertEquals(20, $ssh->getTimeout());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \phpseclib\Net\SSH2
|
* @return \phpseclib\Net\SSH2
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user