Jamm\Memory\RedisServer::connect PHP Method

connect() public method

public connect ( $host, $port )
    public function connect($host, $port)
    {
        if (!empty($this->connection)) {
            fclose($this->connection);
            $this->connection = NULL;
        }
        $socket = fsockopen($host, $port, $errno, $errstr);
        if (!$socket) {
            $this->reportError('Connection error: ' . $errno . ':' . $errstr);
            return false;
        }
        $this->connection = $socket;
        return $socket;
    }