Redis: added Command::ping() and Client::isConnected()

This commit is contained in:
Günter Obiltschnig
2018-07-31 15:12:43 +02:00
parent 142bbdcef3
commit 6107b43a7b
4 changed files with 35 additions and 15 deletions

View File

@@ -116,6 +116,9 @@ public:
void disconnect();
/// Disconnects from the Redis server.
bool isConnected() const;
/// Returns true iff the Client is connected to a Redis server.
template<typename T>
T execute(const Array& command)
/// Sends the Redis Command to the server. It gets the reply

View File

@@ -252,6 +252,9 @@ public:
static Command rpush(const std::string& list, const StringVec& value, bool create = true);
/// Creates and returns a RPUSH or RPUSHX (when create is false) command.
static Command ping();
/// Creates and returns a PING command.
};