Skip to content
This repository has been archived by the owner on Apr 6, 2019. It is now read-only.

Commit

Permalink
[3.3.0] update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Cylix committed Apr 4, 2017
1 parent 009bdee commit 12ddb5a
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ client.get("hello", [](cpp_redis::reply& reply) {
std::cout << reply << std::endl;
});

client.commit();
# or client.sync_commit(); for synchronous call
client.sync_commit();
# or client.commit(); for synchronous call
```
`cpp_redis::redis_client` [full documentation](https://github.com/Cylix/cpp_redis/wiki/Redis-Client) and [detailed example](https://github.com/Cylix/cpp_redis/wiki/Examples#redis-client).
More about [cpp_redis::reply](https://github.com/Cylix/cpp_redis/wiki/Replies).
Expand All @@ -40,11 +40,30 @@ sub.psubscribe("*", [](const std::string& chan, const std::string& msg) {
std::cout << "PMESSAGE " << chan << ": " << msg << std::endl;
});

sub.commit();
# or sub.sync_commit(); for synchronous call
sub.sync_commit();
# or sub.commit(); for synchronous call
```
`cpp_redis::redis_subscriber` [full documentation](https://github.com/Cylix/cpp_redis/wiki/Redis-Subscriber) and [detailed example](https://github.com/Cylix/cpp_redis/wiki/Examples#redis-subscriber).

`cpp_redis::future_client`:
```cpp
cpp_redis::future_client client;

client.connect();

auto set = client.set("hello", "42");
auto decrby = client.decrby("hello", 12);
auto get = client.get("hello");

client.sync_commit();
# or client.commit(); for synchronous call

std::cout << "set 'hello' 42: " << set.get() << std::endl;
std::cout << "After 'hello' decrement by 12: " << decrby.get() << std::endl;
std::cout << "get 'hello': " << get.get() << std::endl;
```
`cpp_redis::future_client` [full documentation](https://github.com/Cylix/cpp_redis/wiki/Future-Client) and [detailed example](https://github.com/Cylix/cpp_redis/wiki/Examples#future-client).

## Wiki
A [Wiki](https://github.com/Cylix/cpp_redis/wiki) is available and provides full documentation for the library as well as [installation explanations](https://github.com/Cylix/cpp_redis/wiki/Installation).

Expand Down

0 comments on commit 12ddb5a

Please sign in to comment.