MCPcopy Create free account
hub / github.com/F-Stack/f-stack / addReplyNullArray

Function addReplyNullArray

app/redis-6.2.6/src/networking.c:806–812  ·  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

804 * RESP2 protocol, however for RESP3 the reply will always be just the
805 * Null type "_\r\n". */
806void addReplyNullArray(client *c) {
807 if (c->resp == 2) {
808 addReplyProto(c,"*-1\r\n",5);
809 } else {
810 addReplyProto(c,"_\r\n",3);
811 }
812}
813
814/* Create the length prefix of a bulk reply, example: $2234 */
815void addReplyBulkLen(client *c, robj *obj) {

Callers 11

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

Calls 1

addReplyProtoFunction · 0.85

Tested by

no test coverage detected