Reply with a bulk string, taking in input a C buffer pointer and length. * * The function always returns REDISMODULE_OK. */
| 1676 | * |
| 1677 | * The function always returns REDISMODULE_OK. */ |
| 1678 | int 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. |
nothing calls this directly
no test coverage detected