Socket
Socket
Sign inDemoInstall

hiredis

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hiredis - npm Package Compare versions

Comparing version 0.1.14 to 0.1.15

binding.gyp

8

deps/hiredis/CHANGELOG.md

@@ -0,1 +1,9 @@

### 0.11.0
* Increase the maximum multi-bulk reply depth to 8.
* Increase the read buffer size from 2k to 16k.
* Use poll(2) instead of select(2) to support large fds (>= 1024).
### 0.10.1

@@ -2,0 +10,0 @@

29

deps/hiredis/README.md

@@ -76,3 +76,3 @@ # HIREDIS

reply = redisCommand("SET key:%s %s", myid, value);
reply = redisCommand(context, "SET key:%s %s", myid, value);

@@ -324,2 +324,6 @@ ### Using replies

The same set of functions are used internally by hiredis when creating a
normal Redis context, the above API just exposes it to the user for a direct
usage.
### Usage

@@ -351,2 +355,25 @@

### Reader max buffer
Both when using the Reader API directly or when using it indirectly via a
normal Redis context, the redisReader structure uses a buffer in order to
accumulate data from the server.
Usually this buffer is destroyed when it is empty and is larger than 16
kb in order to avoid wasting memory in unused buffers
However when working with very big payloads destroying the buffer may slow
down performances considerably, so it is possible to modify the max size of
an idle buffer changing the value of the `maxbuf` field of the reader structure
to the desired value. The special value of 0 means that there is no maximum
value for an idle buffer, so the buffer will never get freed.
For instance if you have a normal Redis context you can set the maximum idle
buffer to zero (unlimited) just with:
context->reader->maxbuf = 0;
This should be done only in order to maximize performances when working with
large payloads. The context should be set back to `REDIS_READER_MAX_BUF` again
as soon as possible in order to prevent allocation of useless memory.
## AUTHORS

@@ -353,0 +380,0 @@

9

hiredis.js

@@ -1,9 +0,4 @@

var hiredis, net = require("net");
var net = require("net"),
hiredis = require('bindings')('hiredis.node');
try {
hiredis = require('./build/Release/hiredis');
} catch (e) {
hiredis = require('./build/default/hiredis');
}
exports.Reader = hiredis.Reader;

@@ -10,0 +5,0 @@ exports.createConnection = function(port, host) {

{
"name": "hiredis",
"description": "Wrapper for reply processing code in hiredis",
"version": "0.1.14",
"version": "0.1.15",
"homepage": "http://github.com/pietern/hiredis-node",
"author": "Pieter Noordhuis <pcnoordhuis@gmail.com>",
"main": "hiredis",
"directories": {
"lib": "."
},
"scripts": {
"preinstall": "make || gmake",
"test": "node test/reader.js"
},
"dependencies": {
"bindings": "*"
},
"engines": {
"node": "*"
"node": ">= 0.6.0"
}
}
var assert = require("assert"),
hiredis = require("../hiredis");
/* Monkey-patch Buffer.isBuffer on 0.3.1 */
if (process.versions.node == "0.3.1") {
var SlowBuffer = process.binding('buffer').SlowBuffer;
Buffer.isBuffer = function isBuffer(b) {
return b instanceof Buffer || b instanceof SlowBuffer;
};
}
var passed = 0;

@@ -130,2 +122,35 @@ var failed = 0;

test("DeeplyNestedMultiBulkReply", function() {
var i;
var reader = new hiredis.Reader();
var expected = 1;
for (i = 0; i < 8; i++) {
reader.feed("*1\r\n");
expected = [expected];
}
reader.feed(":1\r\n");
assert.deepEqual(reader.get(), expected);
});
test("TooDeeplyNestedMultiBulkReply", function() {
var i;
var reader = new hiredis.Reader();
for (i = 0; i < 9; i++) {
reader.feed("*1\r\n");
}
reader.feed(":1\r\n");
assert.throws(
function() {
reader.get();
},
/nested multi/
);
});
test("MultiBulkReplyWithNonStringValues", function() {

@@ -132,0 +157,0 @@ var reader = new hiredis.Reader();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with āš”ļø by Socket Inc