The connection class, represent a connection to a Redis server.
More...
#include <connection.h>
|
| enum | role_t { ANY = 0,
MASTER = 1,
SLAVE = 2
} |
| |
typedef boost::shared_ptr
< connection > | ptr_t |
| |
|
|
bool | is_valid () |
| |
| void | append (const std::vector< std::string > &args) |
| | Append a command to Redis server. More...
|
| |
| reply | get_reply () |
| | Get a reply from server, blocking call if no reply is ready. More...
|
| |
| std::vector< reply > | get_replies (unsigned int count) |
| | Get specific count of replies requested, blocking if they are not ready yet. More...
|
| |
| reply | run (const std::vector< std::string > &args) |
| | Utility to call append and then get_reply together. More...
|
| |
| redisContext * | c_ptr () |
| | Returns raw ptr to hiredis library connection. Use it with caution and pay attention on memory management. More...
|
| |
|
| static ptr_t | create (const std::string &host="localhost", const unsigned int port=6379) |
| | Create and open a new connection. More...
|
| |
The connection class, represent a connection to a Redis server.
| void connection::append |
( |
const std::vector< std::string > & |
args | ) |
|
Append a command to Redis server.
- Parameters
-
| args | vector with args, example [ "SET", "foo", "bar" ] |
| redisContext* redis3m::connection::c_ptr |
( |
| ) |
|
|
inline |
Returns raw ptr to hiredis library connection. Use it with caution and pay attention on memory management.
- Returns
| static ptr_t redis3m::connection::create |
( |
const std::string & |
host = "localhost", |
|
|
const unsigned int |
port = 6379 |
|
) |
| |
|
inlinestatic |
Create and open a new connection.
- Parameters
-
| host | hostname or ip of redis server, default localhost |
| port | port of redis server, default: 6379 |
- Returns
| std::vector< reply > connection::get_replies |
( |
unsigned int |
count | ) |
|
Get specific count of replies requested, blocking if they are not ready yet.
- Parameters
-
- Returns
| reply connection::get_reply |
( |
| ) |
|
Get a reply from server, blocking call if no reply is ready.
- Returns
- reply object
| reply redis3m::connection::run |
( |
const std::vector< std::string > & |
args | ) |
|
|
inline |
Utility to call append and then get_reply together.
- Parameters
-
- Returns
- reply object
The documentation for this class was generated from the following files: