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

Function addReplyDeferredLen

app/redis-6.2.6/src/networking.c:564–572  ·  view source on GitHub ↗

Adds an empty object to the reply list that will contain the multi bulk * length, which is not known when this function is called. */

Source from the content-addressed store, hash-verified

562/* Adds an empty object to the reply list that will contain the multi bulk
563 * length, which is not known when this function is called. */
564void *addReplyDeferredLen(client *c) {
565 /* Note that we install the write event here even if the object is not
566 * ready to be sent, since we are sure that before returning to the
567 * event loop setDeferredAggregateLen() will be called. */
568 if (prepareClientToWrite(c) != C_OK) return NULL;
569 trimReplyUnusedTailSpace(c);
570 listAddNodeTail(c->reply,NULL); /* NULL is our placeholder. */
571 return listLast(c->reply);
572}
573
574void setDeferredReply(client *c, void *node, const char *s, size_t length) {
575 listNode *ln = (listNode*)node;

Callers 15

configGetCommandFunction · 0.85
luaReplyToRedisReplyFunction · 0.85
pubsubCommandFunction · 0.85
sentinelConfigGetCommandFunction · 0.85
roleCommandFunction · 0.85
stralgoLCSFunction · 0.85
slowlogCommandFunction · 0.85
addReplyCommandFunction · 0.85
addReplyHelpFunction · 0.85
clientCommandFunction · 0.85

Calls 3

prepareClientToWriteFunction · 0.85
trimReplyUnusedTailSpaceFunction · 0.85
listAddNodeTailFunction · 0.85

Tested by

no test coverage detected