Newer
Older
setKey("DAQ_key");
this->stream = rediscpp::make_stream("localhost", "6379");
}
RedisProvider::RedisProvider(std::string ip, int port, std::string key) {
this->stream = rediscpp::make_stream(ip, std::to_string(port));
int RedisProvider::write(BasePacket &packet, std::string key) {
int RedisProvider::open() {
try {
auto response = rediscpp::execute(*stream, "ping");
return 1;
} catch (std::exception const &e) {
std::cerr << "Error: " << e.what() << std::endl;
return EXIT_FAILURE;
}