diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 932af869..06f5e7a0 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -2076,6 +2076,16 @@ class Net_SSH2 { $this->disconnect(); } + /** + * Is the connection still active? + * + * @access public + */ + function isConnected() + { + return $this->bitmap & NET_SSH2_MASK_LOGIN; + } + /** * Gets Binary Packets *