MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / addReplyNullArray

Function addReplyNullArray

src/networking.cpp:965–972  ·  view source on GitHub ↗

A null array is a concept that no longer exists in RESP3. However * RESP2 had it, so API-wise we have this call, that will emit the correct * RESP2 protocol, however for RESP3 the reply will always be just the * Null type "_\r\n". */

Source from the content-addressed store, hash-verified

963 * RESP2 protocol, however for RESP3 the reply will always be just the
964 * Null type "_\r\n". */
965void addReplyNullArray(client *c)
966{
967 if (c->resp == 2) {
968 addReplyProto(c,"*-1\r\n",5);
969 } else {
970 addReplyProto(c,"_\r\n",3);
971 }
972}
973
974/* Create the length prefix of a bulk reply, example: $2234 */
975void addReplyBulkLen(client *c, robj_roptr obj) {

Callers 11

geoposCommandFunction · 0.85
xrangeGenericCommandFunction · 0.85
xreadCommandFunction · 0.85
xpendingCommandFunction · 0.85
RM_ReplyWithNullArrayFunction · 0.85
sentinelCommandFunction · 0.85
popGenericCommandFunction · 0.85

Calls 1

addReplyProtoFunction · 0.85

Tested by

no test coverage detected