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

Function RM_ReplyWithCString

src/module.cpp:1692–1700  ·  view source on GitHub ↗

Reply with a bulk string, taking in input a C buffer pointer that is * assumed to be null-terminated. * * The function always returns REDISMODULE_OK. */

Source from the content-addressed store, hash-verified

1690 *
1691 * The function always returns REDISMODULE_OK. */
1692int RM_ReplyWithCString(RedisModuleCtx *ctx, const char *buf) {
1693 client *c = moduleGetReplyClient(ctx);
1694 if (c == NULL) return REDISMODULE_OK;
1695 AeLocker locker;
1696 std::unique_lock<fastlock> lock(c->lock);
1697 locker.arm(c);
1698 addReplyBulkCString(c,(char*)buf);
1699 return REDISMODULE_OK;
1700}
1701
1702/* Reply with a bulk string, taking in input a RedisModuleString object.
1703 *

Callers

nothing calls this directly

Calls 3

moduleGetReplyClientFunction · 0.85
addReplyBulkCStringFunction · 0.85
armMethod · 0.80

Tested by

no test coverage detected