redis的C语言client,有几个:https://redis.io/clients#c

支持cluster的只有一个唯品会的版本:https://github.com/vipshop/hiredis-vip

编译:

make

输出:

-rw-r--r-- 1 root  root  980154 Nov  2 16:42 libhiredis_vip.a
-rwxr-xr-x 1 root  root  489022 Nov  2 16:42 libhiredis_vip.so

编译例子:

make hiredis-example

可以通过对文件examples/example.c做一些修改,还进行测试。

 

API和文档都在README里,细心的看很好理解。

通过examples下的例子可以知道支持五种异步方式:

ae / glib / libev / libevent / libuv

 

相关文章:

  • 2021-08-22
  • 2022-12-23
  • 2021-05-22
  • 2021-05-25
  • 2022-01-20
  • 2022-01-23
猜你喜欢
  • 2021-07-31
  • 2022-12-23
  • 2021-08-10
  • 2022-03-03
  • 2021-10-23
相关资源
相似解决方案