资源简介
redis-2.6.13.tar.gz
代码片段和文件信息
/*
* Copyright (c) 2009-2011 Salvatore Sanfilippo
* Copyright (c) 2010-2011 Pieter Noordhuis
*
* All rights reserved.
*
* Redistribution and use in source and binary forms with or without
* modification are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Redis nor the names of its contributors may be used
* to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS“
* AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR
* CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE DATA OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN
* CONTRACT STRICT LIABILITY OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include “fmacros.h“
#include
#include
#include
#include
#include
#include
#include “async.h“
#include “net.h“
#include “dict.c“
#include “sds.h“
#define _EL_ADD_READ(ctx) do { \
if ((ctx)->ev.addRead) (ctx)->ev.addRead((ctx)->ev.data); \
} while(0)
#define _EL_DEL_READ(ctx) do { \
if ((ctx)->ev.delRead) (ctx)->ev.delRead((ctx)->ev.data); \
} while(0)
#define _EL_ADD_WRITE(ctx) do { \
if ((ctx)->ev.addWrite) (ctx)->ev.addWrite((ctx)->ev.data); \
} while(0)
#define _EL_DEL_WRITE(ctx) do { \
if ((ctx)->ev.delWrite) (ctx)->ev.delWrite((ctx)->ev.data); \
} while(0)
#define _EL_CLEANUP(ctx) do { \
if ((ctx)->ev.cleanup) (ctx)->ev.cleanup((ctx)->ev.data); \
} while(0);
/* Forward declaration of function in hiredis.c */
void __redisAppendCommand(redisContext *c char *cmd size_t len);
/* Functions managing dictionary of callbacks for pub/sub. */
static unsigned int callbackHash(const void *key) {
return dictGenHashFunction((unsigned char*)keysdslen((char*)key));
}
static void *callbackValDup(void *privdata const void *src) {
((void) privdata);
redisCallback *dup = malloc(sizeof(*dup));
memcpy(dupsrcsizeof(*dup));
return dup;
}
static int callba
- 上一篇:模拟磁盘文件系统实现
- 下一篇:基于STM32的云台控制-技术论文
相关资源
- SSM+Shiro+redis实现单点登陆
- redisson的demo
- Spring-Data-Redis2.0+Spring5
- mongodb+redis资源
- redis安装包
- 破解ServiceStack.Redis每小时6000次限制
- redis for Windows
- 爱旅行项目源码
- The Apache Ignite book PDF(正版购买的全网
- vcredist2010_x64
- redis-4.0.9.tar
- 使用redisson替代jedis
- .NET下Redis操作类
- (龙果学院)从无到有搭建中小型互
- 数字预失真设计参考Mixed Signal Digita
- redisplus 3.2 客户端
- 狂神说Redis笔记.pdf
- 基于SSM的校社联社团管理系统SpringM
- 大规模redis集群的服务治理之路
- Redis哨兵模式sentinel学习总结及部署记
- redis-5.0.2.tar.gz
- Twemproxy需要的依赖,加Redis安装包,
- springboot整合mybatis+plus+avtiveMq+redis
- Redis-x64-3.2.100安装.zip
- pc6-vcredist_x86
- redis-5.0.8-x64-for-windows.zip
- windows下64位的redis-2.8.12
- redis-3.2.9.tar.gz
- 分布式集群Session共享 简单多tomcat8+
- redis64-latest.zip
评论
共有 条评论