Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

socket.io-redis

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

socket.io-redis - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

5

History.md
0.1.2 / 2014-05-17
==================
* check for default namespace before ignoring one
0.1.1 / 2014-03-18

@@ -3,0 +8,0 @@ ==================

12

index.js

@@ -43,2 +43,3 @@

// opts
var socket = opts.socket;
var host = opts.host || '127.0.0.1';

@@ -51,5 +52,8 @@ var port = Number(opts.port || 6379);

// init clients if needed
if (!pub) pub = redis(port, host);
if (!sub) sub = redis(port, host, {detect_buffers: true});
if (!pub) pub = socket ? redis(socket) : redis(port, host);
if (!sub) sub = socket
? redis(socket, { detect_buffers: true })
: redis(port, host, {detect_buffers: true});
// this server's key

@@ -92,2 +96,6 @@ var uid = uid2(6);

var args = msgpack.decode(msg);
if (args[0] && args[0].nsp === undefined)
args[0].nsp = '/'
if (!args[0] || args[0].nsp != this.nsp.name) return debug('ignore different namespace')

@@ -94,0 +102,0 @@ args.push(true);

2

package.json
{
"name": "socket.io-redis",
"version": "0.1.1",
"version": "0.1.2",
"description": "",

@@ -5,0 +5,0 @@ "scripts": {

@@ -1,5 +0,4 @@

# socket.io-redis
[![Build Status](https://secure.travis-ci.org/LearnBoost/socket.io-redis.png)](http://travis-ci.org/LearnBoost/socket.io-redis)
[![Build Status](https://secure.travis-ci.org/Automattic/socket.io-redis.png)](http://travis-ci.org/Automattic/socket.io-redis)
[![NPM version](https://badge.fury.io/js/socket.io-redis.png)](http://badge.fury.io/js/socket.io-redis)

@@ -12,3 +11,3 @@

var redis = require('socket.io-redis');
io.adapter(redis({ host: 'localhost', port: 6379 ));
io.adapter(redis({ host: 'localhost', port: 6379 }));
```

@@ -21,4 +20,3 @@

If you need to emit events to socket.io instances from a non-socket.io
process, you should use
[socket.io-emit](http:///github.com/learnboost/socket.io-emit).
process, you should use [socket.io-emitter](http:///github.com/Automattic/socket.io-emitter).

@@ -39,2 +37,4 @@ ## API

- `port`: port to connect to redis on (`6379`)
- `socket`: unix domain socket to connect to redis (`"/tmp/redis.sock"`). Will
be used instead of the host and port options if specified.
- `pubClient`: optional, the redis client to publish events on

@@ -41,0 +41,0 @@ - `subClient`: optional, the redis client to subscribe to events on

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