protected function _cmdLogout($sendLogoutCMD = true) { $this->_checkConnected(); if ($sendLogoutCMD) { $this->_doCmd('LOGOUT'); } $this->_sock->close(); $this->_state = self::STATE_DISCONNECTED; }