| 207 | } |
| 208 | |
| 209 | redis_result* redis_client::get_status(socket_stream& conn, dbuf_pool* dbuf) |
| 210 | { |
| 211 | string& buf = conn.get_buf(); |
| 212 | buf.clear(); |
| 213 | if (!conn_.gets(buf)) { |
| 214 | logger_error("gets error, server: %s", conn.get_peer(true)); |
| 215 | return NULL; |
| 216 | } |
| 217 | |
| 218 | redis_result* rr = new(dbuf) redis_result(dbuf); |
| 219 | rr->set_type(REDIS_RESULT_STATUS); |
| 220 | rr->set_size(1); |
| 221 | |
| 222 | put_data(dbuf, rr, buf.c_str(), buf.length()); |
| 223 | return rr; |
| 224 | } |
| 225 | |
| 226 | redis_result* redis_client::get_integer(socket_stream& conn, dbuf_pool* dbuf) |
| 227 | { |