mirror of
https://github.com/boostorg/redis.git
synced 2026-01-19 04:42:09 +00:00
More improvements in the readme.
This commit is contained in:
13
README.md
13
README.md
@@ -17,12 +17,12 @@ gets finally merged in to the standard).
|
||||
Sending a command to a redis server is as simple as
|
||||
|
||||
```cpp
|
||||
void send(std::string cmd)
|
||||
void send_ping()
|
||||
{
|
||||
net::io_context ioc;
|
||||
session s {ioc};
|
||||
|
||||
s.send(cmd);
|
||||
s.send(ping());
|
||||
|
||||
s.run();
|
||||
ioc.run();
|
||||
@@ -104,7 +104,6 @@ The maximum pipeline size above refers to the blocks of commands sent
|
||||
via the `session::send` function and not to the individual commands.
|
||||
Logging is made using `std::clog`. The string `"id"` passed as third
|
||||
argument to the session is prefixed to each log message.
|
||||
Support for redis sentinel is still not implemented.
|
||||
|
||||
# Callbacks
|
||||
|
||||
@@ -142,10 +141,6 @@ void example3()
|
||||
|
||||
# Missing features
|
||||
|
||||
The main missing features at the moment are
|
||||
|
||||
* Sentinel
|
||||
* Cluster
|
||||
|
||||
I will implement those on demand.
|
||||
At the moment the main missing feature is support for redis cluster which I
|
||||
may implement in the future if I need it.
|
||||
|
||||
|
||||
14
examples.cpp
14
examples.cpp
@@ -181,11 +181,23 @@ void example3()
|
||||
ioc.run();
|
||||
}
|
||||
|
||||
void send_ping()
|
||||
{
|
||||
net::io_context ioc;
|
||||
session s {ioc};
|
||||
|
||||
s.send(ping());
|
||||
|
||||
s.run();
|
||||
ioc.run();
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
example1();
|
||||
//example1();
|
||||
//example2();
|
||||
//example3();
|
||||
//rpush_ex();
|
||||
send_ping();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user