MCPcopy Create free account
hub / github.com/acl-dev/acl / get_object

Method get_object

lib_acl_cpp/src/redis/redis_client.cpp:340–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338}
339
340redis_result* redis_client::get_object(socket_stream& conn, dbuf_pool* dbuf)
341{
342 char ch;
343 if (!conn.read(ch)) {
344 logger_warn("read char error: %s, timeo=%d, server: %s, fd: %u",
345 last_serror(), conn.get_rw_timeout(), conn.get_peer(true),
346 (unsigned) conn.sock_handle());
347 return NULL;
348 }
349
350 switch (ch) {
351 case '-': // ERROR
352 return get_error(conn, dbuf);
353 case '+': // STATUS
354 return get_status(conn, dbuf);
355 case ':': // INTEGER
356 return get_integer(conn, dbuf);
357 case '$': // STRING
358 return get_string(conn, dbuf);
359 case '*': // ARRAY
360 return get_array(conn, dbuf);
361 default: // INVALID
362 logger_error("invalid first char: %c, %d", ch, ch);
363 return NULL;
364 }
365}
366
367redis_result* redis_client::get_objects(socket_stream& conn,
368 dbuf_pool* dbuf, size_t nobjs)

Callers 1

get_resultMethod · 0.45

Calls 7

get_rw_timeoutMethod · 0.80
last_serrorFunction · 0.50
get_errorFunction · 0.50
get_statusFunction · 0.50
readMethod · 0.45
get_peerMethod · 0.45
sock_handleMethod · 0.45

Tested by

no test coverage detected