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

Function addReplyDeferredLenCore

src/networking.cpp:695–703  ·  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

693/* Adds an empty object to the reply list that will contain the multi bulk
694 * length, which is not known when this function is called. */
695void *addReplyDeferredLenCore(client *c) {
696 /* Note that we install the write event here even if the object is not
697 * ready to be sent, since we are sure that before returning to the
698 * event loop setDeferredAggregateLen() will be called. */
699 if (prepareClientToWrite(c) != C_OK) return NULL;
700 trimReplyUnusedTailSpace(c);
701 listAddNodeTail(c->reply,NULL); /* NULL is our placeholder. */
702 return listLast(c->reply);
703}
704
705void *addReplyDeferredLen(client *c) {
706 if (FCorrectThread(c))

Callers 1

addReplyDeferredLenFunction · 0.85

Calls 3

prepareClientToWriteFunction · 0.85
trimReplyUnusedTailSpaceFunction · 0.85
listAddNodeTailFunction · 0.85

Tested by

no test coverage detected