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

socket.io-adapter

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

socket.io-adapter - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

10

History.md
0.3.1 / 2014-10-27
==================
* bump parser version
* fix room autopruning
* add autoprunning of empty rooms
* rooms are now created as objects
* added the repository field.
* updated the debug dependency.
0.3.0 / 2014-05-30

@@ -3,0 +13,0 @@ ==================

35

index.js

@@ -6,2 +6,3 @@

var keys = require('object-keys');
var Emitter = require('events').EventEmitter;

@@ -48,3 +49,3 @@ var parser = require('socket.io-parser');

this.sids[id][room] = true;
this.rooms[room] = this.rooms[room] || [];
this.rooms[room] = this.rooms[room] || {};
this.rooms[room][id] = true;

@@ -68,2 +69,6 @@ if (fn) process.nextTick(fn.bind(null, null));

delete this.rooms[room][id];
if (this.rooms.hasOwnProperty(room) && !keys(this.rooms[room]).length) {
delete this.rooms[room];
}
if (fn) process.nextTick(fn.bind(null, null));

@@ -83,3 +88,9 @@ };

for (var room in rooms) {
delete this.rooms[room][id];
if (rooms.hasOwnProperty(room)) {
delete this.rooms[room][id];
}
if (this.rooms.hasOwnProperty(room) && !keys(this.rooms[room]).length) {
delete this.rooms[room];
}
}

@@ -117,7 +128,9 @@ }

for (var id in room) {
if (ids[id] || ~except.indexOf(id)) continue;
socket = self.nsp.connected[id];
if (socket) {
socket.packet(encodedPackets, true, flags.volatile);
ids[id] = true;
if (room.hasOwnProperty(id)) {
if (ids[id] || ~except.indexOf(id)) continue;
socket = self.nsp.connected[id];
if (socket) {
socket.packet(encodedPackets, true, flags.volatile);
ids[id] = true;
}
}

@@ -128,5 +141,7 @@ }

for (var id in self.sids) {
if (~except.indexOf(id)) continue;
socket = self.nsp.connected[id];
if (socket) socket.packet(encodedPackets, true, flags.volatile);
if (self.sids.hasOwnProperty(id)) {
if (~except.indexOf(id)) continue;
socket = self.nsp.connected[id];
if (socket) socket.packet(encodedPackets, true, flags.volatile);
}
}

@@ -133,0 +148,0 @@ }

{
"name": "socket.io-adapter",
"version": "0.3.0",
"version": "0.3.1",
"repository": {
"type": "git",
"url": "git://github.com/Automattic/socket.io-adapter.git"
},
"description": "",
"dependencies": {
"debug": "0.7.4",
"socket.io-parser": "2.2.0"
"debug": "1.0.2",
"socket.io-parser": "2.2.2",
"object-keys": "1.0.1"
}
}
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