hiredis

How to use HSCAN command in Redis?

让人想犯罪 __ 提交于 2019-12-05 08:14:12
I want to use Redis's HSCAN command in my assignment but I have no idea how it works. Redis's official page ( http://redis.io/commands/hscan ) for this command gives me blank page. I am getting continuous input data and saving them instantaneously in multiple hashes in Redis and I would like to iterate through all of them at later point of time. I'm using following command to save my data HMSET myhash ordertype "neworder" order_ts "1234" act_type "order_ack" ack_ts "1240" HMSET myhash2 ordertype "neworder" order_ts "2234" act_type "order_ack" ack_ts "2240" Can anyone give me some examples of

Windows下编译Redis5.0.5

匿名 (未验证) 提交于 2019-12-03 00:44:02
先去弄Cygwin环境 http://www.cygwin.com/ 下载完成 打开 下一步 下一步 下一步 下一步 下一步,出现一个界面,让你添加地址,你打开官网,选择mirror sites,点击下面的 Hong Kong( http://mirror-hk.koddos.net/cygwin/ ) 把Hong Kong的地址填上,下一步,出现一个选择包的界面 搜索框里输入文字自动搜索,点击“New”的一列,有个那个下拉按钮,选择版本 还有automake 下一步 下一步 完成 双击桌面上的图标,启动 检查状态和版本 $ cygcheck - c cygwin Cygwin Package Information Package Version Status cygwin 3.0 . 7 - 1 OK 检查gcc $ gcc -- version gcc ( GCC ) 7.4 . 0 Copyright 2017 Free Software Foundation , Inc . 本程序是自由软件;请参看源代码的版权声明。本软件没有任何担保; 包括没有适销性和某一专用目的下的适用性担保。 检查make $ make -- version GNU Make 4.2 . 1 Ϊ x86_64 - unknown - cygwin 编译 Copyright ( C ) 1988 -

Hiredis waiting for message

五迷三道 提交于 2019-12-02 00:38:34
I am using hiredis C library to connect to redis server. I am not able to figure out how to wait for new messages after subscribing to new message. My code look like: signal(SIGPIPE, SIG_IGN ); struct event_base *base = event_base_new(); redisAsyncContext *c = redisAsyncConnect("127.0.0.1", 6379); if (c->err) { /* Let *c leak for now... */ printf("Error: %s\n", c->errstr); return 1; } redisLibeventAttach(c, base); redisAsyncSetConnectCallback(c, connectCallback); redisAsyncSetDisconnectCallback(c, disconnectCallback); redisAsyncCommand(c, NULL, NULL, "SET key %b", argv[argc - 1], strlen(argv

pkgconfig

可紊 提交于 2019-12-01 10:05:06
# tree hiredis/ hiredis/ └── usr └── local ├── include │ └── hiredis │ ├── adapters │ │ ├── ae.h │ │ ├── glib.h │ │ ├── ivykis.h │ │ ├── libevent.h │ │ ├── libev.h │ │ ├── libuv.h │ │ ├── macosx.h │ │ └── qt.h │ ├── async.h │ ├── hiredis.h │ ├── read.h │ └── sds.h └── lib ├── libhiredis.a ├── libhiredis.so.0.14 └── pkgconfig└── hiredis.pc when cross-compile hiredis package, we can find the pkgconfig dir under pkgconfig dir, we can get hiredis.pc content : cat hiredis/usr/local/lib/pkgconfig/hiredis.pc prefix=/home/vmuer/work/git/hiredis/usr/local exec_prefix=${prefix} libdir=/home/vmuer/work

Redis C客户端库Hiredis的应用

∥☆過路亽.° 提交于 2019-11-29 02:25:43
Redis   Redis(REmote DIctionary Server)是一个高性能的key-value数据库。   Redis是一个开源的使用ANSI C语言编写、遵守BSD协议、支持网络、可基于内存亦可持久化的日志型、Key-Value数据库,并提供多种语言的API。它通常被称为数据结构服务器,因为值(value)可以是 字符串(String), 哈希(Map), 列表(list), 集合(sets) 和 有序集合(sorted sets)等类型。   Redis的使用这里不做说明,请参考如下网址:   http://redisdoc.com/   http://www.runoob.com/redis/redis-tutorial.html Hiredis   Hiredis是Redis数据库的一个极简C客户端库,只是对Redis协议的最小支持。   源码地址:https://github.com/redis/hiredis 1. 同步接口 (1)建立连接:与Redis server建立连接,返回一个redisContext结构指针 redisContext *redisConnect(const char *ip, int port);redisContext *redisConnectWithTimeout(const char *ip, int port,

hiredis安装和使用

旧城冷巷雨未停 提交于 2019-11-26 20:48:56
一。hiredis安装和测试 1.git clone https://github.com/redis/hiredis.git 2.cd hiredis 3.make 4.make install 5.sudo ldconfig (更新动态库配置文件) 6.cd hiredis/example 7.gcc example.c -o example -I /usr/local/include/hiredis -lhiredis 二。hiredis API 来源: https://www.cnblogs.com/sclu/p/11333048.html