/** * Disconnect from socket. * * @return boolean */ public function disconnect() { if ($this->_isConnected) { $this->_isConnected = !$this->_connection->close(); } return !$this->_isConnected; }