Added IsConnected() method.