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

Function setDeferredReplyBulkSds

src/networking.cpp:1003–1008  ·  view source on GitHub ↗

Set sds to a deferred reply (for symmetry with addReplyBulkSds it also frees the sds) */

Source from the content-addressed store, hash-verified

1001
1002/* Set sds to a deferred reply (for symmetry with addReplyBulkSds it also frees the sds) */
1003void setDeferredReplyBulkSds(client *c, void *node, sds s) {
1004 sds reply = sdscatprintf(sdsempty(), "$%d\r\n%s\r\n", (unsigned)sdslen(s), s);
1005 setDeferredReply(c, node, reply, sdslen(reply));
1006 sdsfree(reply);
1007 sdsfree(s);
1008}
1009
1010/* Add a C null term string as bulk reply */
1011void addReplyBulkCString(client *c, const char *s) {

Callers 1

setDeferredReplyStreamIDFunction · 0.85

Calls 5

sdscatprintfFunction · 0.85
sdsemptyFunction · 0.85
sdslenFunction · 0.85
setDeferredReplyFunction · 0.85
sdsfreeFunction · 0.85

Tested by

no test coverage detected