| 39 | } |
| 40 | |
| 41 | bool redis_connection::auth(const char* passwd) |
| 42 | { |
| 43 | const char* argv[2]; |
| 44 | size_t lens[2]; |
| 45 | |
| 46 | argv[0] = "AUTH"; |
| 47 | lens[0] = sizeof("AUTH") - 1; |
| 48 | |
| 49 | argv[1] = passwd; |
| 50 | lens[1] = strlen(passwd); |
| 51 | |
| 52 | build_request(2, argv, lens); |
| 53 | return check_status(); |
| 54 | } |
| 55 | |
| 56 | bool redis_connection::select(int dbnum) |
| 57 | { |