Redis Tutorial (15): C Language Connection Operation code instance

Source: Internet
Author: User
Tags redis server redis tutorial

Reproduced in: http://www.itxuexiwang.com/a/shujukujishu/redis/2016/0216/143.html

The various operational commands, operating mechanisms, and server initialization parameter configurations of Redis have been described in great detail in previous blogs. This blog is the last of a series of blogs that will give you code examples for accessing and manipulating Redis servers based on the Redis client component. It should be explained, however, that since Redis does not officially provide a Windows platform client based on C interfaces, the following example can only be run on the Linux/unix platform. However, for developers using other programming languages, such as C # and Java,redis, which provide client components for these languages, it is also possible to achieve various interactions based on the Windows platform and the Redis server.

The client used in this blog is from the Redis official website and is the Redis-recommended C-interface-based client component, as shown in the following link:
Https://github.com/antirez/hiredis
In the following code example, two of the most commonly used REDIS command operations are given, both in normal invocation and pipeline-based invocation mode.

Note: Please note the comments when reading the code.

#include <stdio.h> #include <stdlib.h> #include <stddef.h> #include <stdarg.h> #include <  string.h> #include <assert.h> #include 

Redis Tutorial (15): C Language Connection Operation code instance

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.