wangfly80

Results 2 issues of wangfly80

读取服务端响应没有对tcp数据流进行粘包和拆包,这个应该有问题吧 调用read返回的nread长度不一定等于一条完整消息的长度吧,有可能会小于。 int redisBufferRead(redisContext *c) { char buf[1024*16]; int nread; /* Return early when the context has seen an error. */ if (c->err) return REDIS_ERR; nread = read(c->fd,buf,sizeof(buf)); if (nread...