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

Function RM_ReplyWithVerbatimString

src/module.cpp:1732–1740  ·  view source on GitHub ↗

Reply with a binary safe string, which should not be escaped or filtered * taking in input a C buffer pointer and length. * * The function always returns REDISMODULE_OK. */

Source from the content-addressed store, hash-verified

1730 *
1731 * The function always returns REDISMODULE_OK. */
1732int RM_ReplyWithVerbatimString(RedisModuleCtx *ctx, const char *buf, size_t len) {
1733 client *c = moduleGetReplyClient(ctx);
1734 if (c == NULL) return REDISMODULE_OK;
1735 AeLocker locker;
1736 std::unique_lock<fastlock> lock(c->lock);
1737 locker.arm(c);
1738 addReplyVerbatim(c, buf, len, "txt");
1739 return REDISMODULE_OK;
1740}
1741
1742/* Reply to the client with a NULL.
1743 *

Callers

nothing calls this directly

Calls 3

moduleGetReplyClientFunction · 0.85
addReplyVerbatimFunction · 0.85
armMethod · 0.80

Tested by

no test coverage detected