Newer
Older
/*
*
* Created on: Mar 1, 2021
* Author: astrisw
*/
#ifndef REDISPROVIDER_H_
#define REDISPROVIDER_H_
#include <Base_Provider.h>
#include <unordered_map>
class RedisProvider : public BaseProvider{
private:
std::string & key = *(&this->dest);
void setDest(std::string dest){setKey(dest);}
std::string getDest(){return getKey();}
public:
RedisProvider();
RedisProvider(std::string ip, int port, std::string key);
void setKey(std::string key){this->key=key;}
std::string getIp(){return this->ip;}
int write(BasePacket &);
int write(BasePacket &, std::string dest);
int close();
int open();