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

Function RM_ReplyWithCallReply

app/redis-6.2.6/src/module.c:1700–1706  ·  view source on GitHub ↗

Reply exactly what a Redis command returned us with RedisModule_Call(). * This function is useful when we use RedisModule_Call() in order to * execute some command, as we want to reply to the client exactly the * same reply we obtained by the command. * * The function always returns REDISMODULE_OK. */

Source from the content-addressed store, hash-verified

1698 *
1699 * The function always returns REDISMODULE_OK. */
1700int RM_ReplyWithCallReply(RedisModuleCtx *ctx, RedisModuleCallReply *reply) {
1701 client *c = moduleGetReplyClient(ctx);
1702 if (c == NULL) return REDISMODULE_OK;
1703 sds proto = sdsnewlen(reply->proto, reply->protolen);
1704 addReplySds(c,proto);
1705 return REDISMODULE_OK;
1706}
1707
1708/* Send a string reply obtained converting the double 'd' into a bulk string.
1709 * This function is basically equivalent to converting a double into

Callers

nothing calls this directly

Calls 3

moduleGetReplyClientFunction · 0.85
sdsnewlenFunction · 0.85
addReplySdsFunction · 0.85

Tested by

no test coverage detected