protected function _checkStream() { if (!is_resource($this->_stream)) { throw new Client\Exception('Not connected'); } }