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

Function addReplySds

src/networking.cpp:464–473  ·  view source on GitHub ↗

Add the SDS 's' string to the client output buffer, as a side effect * the SDS string is freed. */

Source from the content-addressed store, hash-verified

462/* Add the SDS 's' string to the client output buffer, as a side effect
463 * the SDS string is freed. */
464void addReplySds(client *c, sds s) {
465 if (prepareClientToWrite(c) != C_OK) {
466 /* The caller expects the sds to be free'd. */
467 sdsfree(s);
468 return;
469 }
470 if (_addReplyToBuffer(c,s,sdslen(s)) != C_OK)
471 _addReplyProtoToList(c,s,sdslen(s));
472 sdsfree(s);
473}
474
475/* This low level function just adds whatever protocol you send it to the
476 * client buffer, trying the static buffer initially, and using the string

Callers 9

clusterCommandFunction · 0.85
migrateCommandFunction · 0.85
replconfCommandFunction · 0.85
replicaofCommandFunction · 0.85
debugCommandFunction · 0.85
RM_ReplyWithCallReplyFunction · 0.85
sentinelCommandFunction · 0.85
addReplyBulkSdsFunction · 0.85
luaReplyToRedisReplyFunction · 0.85

Calls 5

prepareClientToWriteFunction · 0.85
sdsfreeFunction · 0.85
_addReplyToBufferFunction · 0.85
sdslenFunction · 0.85
_addReplyProtoToListFunction · 0.85

Tested by

no test coverage detected