SphinxClient::Close PHP Method

Close() public method

public Close ( )
    function Close()
    {
        if ($this->_socket === false) {
            $this->_error = 'not connected';
            return false;
        }
        fclose($this->_socket);
        $this->_socket = false;
        return true;
    }

Usage Example

 /**
  * Close Sphinx persistent connection.
  *
  * @throws ESphinxException if client is not connected.
  * @link http://sphinxsearch.com/docs/current.html#api-func-close
  */
 public function closeConnection()
 {
     if (!$this->isConnected) {
         throw new ESphinxException("Sphinx client is already closed");
     }
     $this->sphinxClient->Close();
     $this->isConnected = false;
 }
All Usage Examples Of SphinxClient::Close