public function setServer($host, $port = 0)
    {
        assert(is_string($host));
        if ($host[0] == '/') {
            $this->_path = 'unix://'.$host;

            return;
        }
        if (substr($host, 0, 7) == 'unix://') {
            $this->_path = $host;

            return;
        }

        $this->_host = $host;
        if (is_int($port)) {
            if ($port) {
                $this->_port = $port;
            }
        }
        $this->_path = '';

        return $this;
    }
public function setServer($host, $port = 0)
    {
        assert(is_string($host));
        if ($host[0] == '/') {
            $this->_path = 'unix://'.$host;

            return;
        }
        if (substr($host, 0, 7) == 'unix://') {
            $this->_path = $host;

            return;
        }

        $this->_host = $host;
        if (is_int($port)) {
            if ($port) {
                $this->_port = $port;
            }
        }
        $this->_path = '';

        return $this;
    }
public function setServer ( $ host , $ port = 0 ) { assert ( is_string ( $ host ) ) ; if ( $ host [ 0 ] == '/' ) { $ this -> _path = 'unix://' . $ host ; return ; } if ( substr ( $ host , 0 , 7 ) == 'unix://' ) { $ this -> _path = $ host ; return ; } $ this -> _host = $ host ; if ( is_int ( $ port ) ) { if ( $ port ) { $ this -> _port = $ port ; } } $ this -> _path = '' ; return $ this ; }
Sets the searchd host name and port.

@param $host
@param int $port

@return SphinxClient
Sets the searchd host name and port .