From 0333805f5c99fe9d97ac7a5542dd821086097470 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sat, 16 Feb 2013 14:58:12 -0600 Subject: [PATCH] SSH2: Add isConnected() function --- phpseclib/Net/SSH2.php | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 *