Reply with a simple string (`+... \r\n` in RESP protocol). This replies * are suitable only when sending a small non-binary string with small * overhead, like "OK" or similar replies. * * The function always returns REDISMODULE_OK. */
| 1527 | * |
| 1528 | * The function always returns REDISMODULE_OK. */ |
| 1529 | int RM_ReplyWithSimpleString(RedisModuleCtx *ctx, const char *msg) { |
| 1530 | client *c = moduleGetReplyClient(ctx); |
| 1531 | if (c == NULL) return REDISMODULE_OK; |
| 1532 | addReplyProto(c,"+",1); |
| 1533 | addReplyProto(c,msg,strlen(msg)); |
| 1534 | addReplyProto(c,"\r\n",2); |
| 1535 | return REDISMODULE_OK; |
| 1536 | } |
| 1537 | |
| 1538 | /* Reply with an array type of 'len' elements. However 'len' other calls |
| 1539 | * to `ReplyWith*` style functions must follow in order to emit the elements |
nothing calls this directly
no test coverage detected