Questions tagged [hiredis]

Hiredis is a minimalistic C client library for the Redis database

Hiredis is a minimalistic C client library for the Redis database.

It is minimalistic because it just adds minimal support for the protocol, but at the same time it uses an high level printf-alike API in order to make it much higher level than otherwise suggested by its minimal code base and the lack of explicit bindings for every Redis command.

Apart from supporting sending commands and receiving replies, it comes with a reply parser that is decoupled from the I/O layer. It is a stream parser designed for easy reusability, which can for instance be used in higher level language bindings for efficient reply parsing.

Hiredis only supports the binary-safe Redis protocol, so you can use it with any Redis version >= 1.2.0.

The library comes with multiple APIs. There is the synchronous API, the asynchronous API and the reply parsing API.

Source Code: https://github.com/redis/hiredis

139 questions
0
votes
1 answer

how to set value which contains blank space in Redis using hiredis

Well ,I am using hiredis client in centos6 to connect redis server and using it's redisAppendCommand() to send command to the server. redisContext *redisConnect(ip,port); std::string value = "E 1"; std::string field_name = "field"; std::string…
Joe.Q
  • 1
  • 2
0
votes
1 answer

How to use SADD command in hiredis?

I want to insert data to redis in C. I found hiredis library. I wrote an example: redisContext *c = redisConnect("127.0.0.1", 6379); if (c != NULL && c->err) { printf("Error: %s\n", c->errstr); // handle error } else { printf("Connected…
sam
  • 1,363
  • 1
  • 20
  • 32
0
votes
2 answers

what do the compiler options mean? and '?'followed by '=-03'

/redis/deps/hiredis/Makefile CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo gcc') OPTIMIZATION?=-O3 WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings DEBUG?= -g -ggdb what do the complier options…
0
votes
1 answer

Is it possible to register events with nginx's event loop?

I want a web server based on nginx, which receives a HTTP message, parses it and checks in Redis for a given key's value and send back a response, all this has to be done asynchronously / non-blocking read/write from Redis. Is it possible? I went…
melwin_jose
  • 315
  • 3
  • 20
0
votes
1 answer

Hiredis fails when deploying with capistrano

When trying to deploy an app with ruby 2.2.0 and rails 4.2.0 with gems redis v3.0.1 and hiredis v0.4.5 task which responsible for interactions with redis server fails with the following…
vvahans
  • 1,849
  • 21
  • 29
0
votes
1 answer

Run "Bundle Install" w/o Installing a Specific Dependency Gem - Rails

I'm trying to run bundle on a Win machine for an existing app. One of the gems is using HiRedis as a dependency. Since it is impossible to install HiRedis on Win: Is there a way to find out which gem is using HiRedis? Is there a way to run bundle…
dimitry_n
  • 2,939
  • 1
  • 30
  • 53
0
votes
1 answer

hiredis getting err 1 REDIS_ERR_IO No such file or directory

redisAsyncConnectUnix() returns a redisAsyncContext(not NULL) that has err=1 i.e REDIS_ERR_IO with errstr "No such file or directory" , what file/directory are they looking for ? Redis is up and running, was able to SET from redis-cli
melwin_jose
  • 315
  • 3
  • 20
0
votes
1 answer

Cannot install hiredis on heroku

I'm unable to install hiredis on heroku, although I use a custom build pack to install hiredis beforehand (https://github.com/keiko713/heroku-buildpack-hiredis). How can I fix that? Here is part of my log when I do git push: …
Phương Nguyễn
  • 8,747
  • 15
  • 62
  • 96
0
votes
1 answer

hiredis run Sync command from Async Context

I'm using the hiredis C client library to interact with Redis in an async context. On some point of my workflow I have to make a Sync call to Redis but I'm not being able to get a successful response from Redis. I'm not sure whether I can issue a…
PauloASilva
  • 1,000
  • 1
  • 7
  • 19
0
votes
1 answer

EBUSY on unlink from "npm install -g oauthd"

So, I have an open issue at the oauthd repo: Issue but the activity in their issue list looks very sporadic. I'm trying to execute "npm install -g oauthd" from a MINGW32 shell. I'm being told by the console that I am doing that wrong. abates@MACHINE…
K. Alan Bates
  • 3,104
  • 5
  • 30
  • 54
0
votes
2 answers

Redis client command error

I am using hiredis. hiredis has the api: void* redisCommand(redisContext *c, char *format, ...) If the format is a c string contain '\0', the format is truncated. How to fix this?
luoluo
  • 5,353
  • 3
  • 30
  • 41
0
votes
3 answers

visual studio c++ redis (msopentech port) client , hiredis

I am new to c++, I decided to give it a try visual studio c++, boost, llvm(which already failed with boost 1.55 and visual studio 2013) and redis. This is a small pet project to parse raw data read from socket and cache into redis. When I tried to…
user3668085
  • 1
  • 1
  • 2
0
votes
0 answers

Libevent HiRedis HTTP Server : Memory Leak in evhttp_send_reply

I'm running the code located here which runs a simple HTTP Server using Libevent. I ran a simple valgrind with the binary, and here's the output, which shows a leak towards evhttp_send_reply & evhttp_make_header :: L349 && L350 The leak shows a…
user1460887
  • 245
  • 1
  • 2
  • 10
0
votes
1 answer

hiredis , How to check if more data is available to read

I am trying to write connection pool using hiredis. Problem I am facing is , if user fires a command and didn't read the response from the connection, I should be clearing the response from that connection before putting to connection pool. Is…
Vivek Goel
  • 22,942
  • 29
  • 114
  • 186
0
votes
0 answers

Clean the reply from Redis

I'm currently building an high speed application which needs to update values on the a redis database using hiredis c library. Currently using pipelined mode for a faster write, to speed up further I don't actually read the reply and free them at…
Vikyboss
  • 940
  • 2
  • 11
  • 23
1 2 3
9
10