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

Function addReplySds

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

374/* Add the SDS 's' string to the client output buffer, as a side effect
375 * the SDS string is freed. */
376void addReplySds(client *c, sds s) {
377 if (prepareClientToWrite(c) != C_OK) {
378 /* The caller expects the sds to be free'd. */
379 sdsfree(s);
380 return;
381 }
382 if (_addReplyToBuffer(c,s,sdslen(s)) != C_OK)
383 _addReplyProtoToList(c,s,sdslen(s));
384 sdsfree(s);
385}
386
387/* This low level function just adds whatever protocol you send it to the
388 * client buffer, trying the static buffer initially, and using the string

Callers 9

luaReplyToRedisReplyFunction · 0.85
sentinelCommandFunction · 0.85
replicaofCommandFunction · 0.85
addReplyBulkSdsFunction · 0.85
clusterCommandFunction · 0.85
migrateCommandFunction · 0.85
debugCommandFunction · 0.85
RM_ReplyWithCallReplyFunction · 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