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

Function RM_ReplyWithStringBuffer

src/module.cpp:1678–1686  ·  view source on GitHub ↗

Reply with a bulk string, taking in input a C buffer pointer and length. * * The function always returns REDISMODULE_OK. */

Source from the content-addressed store, hash-verified

1676 *
1677 * The function always returns REDISMODULE_OK. */
1678int RM_ReplyWithStringBuffer(RedisModuleCtx *ctx, const char *buf, size_t len) {
1679 client *c = moduleGetReplyClient(ctx);
1680 if (c == NULL) return REDISMODULE_OK;
1681 AeLocker locker;
1682 std::unique_lock<fastlock> lock(c->lock);
1683 locker.arm(c);
1684 addReplyBulkCBuffer(c,(char*)buf,len);
1685 return REDISMODULE_OK;
1686}
1687
1688/* Reply with a bulk string, taking in input a C buffer pointer that is
1689 * assumed to be null-terminated.

Callers

nothing calls this directly

Calls 3

moduleGetReplyClientFunction · 0.85
addReplyBulkCBufferFunction · 0.85
armMethod · 0.80

Tested by

no test coverage detected