Skip to content

twobitcircus/ofxRedisGlob

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

ofxRedisGlob

This is a quick and easy addon for using a redis server to publish state across multiple pieces of software. Values you set with set_val will automatically PUBLISH to the server and keys you designate during setup() will be SUBSCRIBE'd. All at the specified period.

There's an easy-to-access redis context in this object which you can easily use for other stuff too

#include "ofxRedisGlob.h"

ofxRedisGlob glob;

void ofApp::setup() {
  vector<string> get_keys;
  get_keys.push_back("monkeys", "dogs");

  glob.setup("127.0.0.1", 6379, get_keys);
  // glob.update() is automatically called for you
}

void ofApp::update() {
  string monkeys = glob.get_val("monkeys");
  glob.set_val("something", 123); // second argument is automatically cast to a string
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages