| Sep | OCT | Nov |
| 21 | ||
| 2019 | 2020 | 2021 |
COLLECTED BY
Collection: github.com
… error while USE_CUSTOM_TCP_CLIENT=on (#62)99b1dda
cpp_redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations, pipelining, sentinels and high availability.
cpp_redis has no dependency. Its only requirement is C++11.
It comes with no network module, so you are free to configure your own, or to use the default one (tacopie)
cpp_redis::client client; client.connect(); client.set("hello", "42"); client.get("hello", [](cpp_redis::reply& reply) { std::cout << reply << std::endl; }); //! also support std::future //! std::future<cpp_redis::reply> get_reply = client.get("hello"); client.sync_commit(); //! or client.commit(); for asynchronous call
cpp_redis::client full documentation and detailed example.
More about cpp_redis::reply.
cpp_redis::subscriber sub; sub.connect(); sub.subscribe("some_chan", [](const std::string& chan, const std::string& msg) { std::cout << "MESSAGE " << chan << ": " << msg << std::endl; }); sub.psubscribe("*", [](const std::string& chan, const std::string& msg) { std::cout << "PMESSAGE " << chan << ": " << msg << std::endl; }); sub.commit();
cpp_redis::subscriber full documentation and detailed example.
cpp_redis is under MIT License.