Skip to content

Commit b87abcd

Browse files
committed
fix #53: add the send method to the future and the sync client
1 parent 6a541d9 commit b87abcd

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

includes/cpp_redis/future_client.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ class future_client {
7171
bool
7272
is_connected() { return m_client.is_connected(); }
7373

74+
future
75+
send(const std::vector<std::string>& redis_cmd) {
76+
return exec_cmd([=](const rcb_t& cb) -> rc& { return m_client.send(redis_cmd, cb); });
77+
}
7478

7579
future
7680
append(const std::string& key, const std::string& value) {

includes/cpp_redis/sync_client.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ class sync_client {
4747
disconnect() { m_client.disconnect(); }
4848
bool
4949
is_connected() { return m_client.is_connected(); }
50-
#if 0
51-
{
52-
return m_client.().get();
50+
51+
reply
52+
send(const std::vector<std::string>& redis_cmd) {
53+
return m_client.send(redis_cmd).get();
5354
}
54-
#endif
55+
5556
reply
5657
append(const std::string& key, const std::string& value) {
5758
return m_client.append(key, value).get();

0 commit comments

Comments
 (0)