Socket
Socket
Sign inDemoInstall

socket.io

Package Overview
Dependencies
Maintainers
0
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

socket.io - npm Package Compare versions

Comparing version 0.7.6 to 0.7.7

node_modules/bison/.gitignore

22

History.md
0.7.7 / 2011-07-12
==================
* Fixed double dispatch handling with emit to closed clients.
* Added test for emitting to closed clients to prevent regression.
* Fixed race condition in redis test.
* Changed Transport#end instrumentation.
* Leveraged $emit instead of emit internally.
* Made tests faster.
* Fixed double disconnect events.
* Fixed disconnect logic
* Simplified remote events handling in Socket.
* Increased testcase timeout.
* Fixed unknown room emitting (GH-291). [3rd-Eden]
* Fixed `address` in handshakeData. [3rd-Eden]
* Removed transports definition in chat example.
* Fixed room cleanup
* Fixed; make sure the client is cleaned up after booting.
* Make sure to mark the client as non-open if the connection is closed.
* Removed unneeded `buffer` declarations.
* Fixed; make sure to clear socket handlers and subscriptions upon transport close.
0.7.6 / 2011-06-30

@@ -3,0 +25,0 @@ ==================

37

lib/manager.js

@@ -327,14 +327,2 @@

Manager.prototype.onDispatch = function (room, packet, volatile, exceptions) {
// go through the users who have pending buffers
for (var i = 0, l = this.closedA.length; i < l; i++) {
if (!this.roomClients[this.closedA[i]]) continue;
if (this.roomClients[this.closedA[i]][room]) {
if (!~exceptions.indexOf(this.closedA[i])) {
this.closed[this.closedA[i]].push(packet);
}
}
}
// go through room clients
if (this.rooms[room]) {

@@ -394,2 +382,6 @@ for (var i = 0, l = this.rooms[room].length; i < l; i++) {

Manager.prototype.onClose = function (id) {
if (this.open[id]) {
delete this.open[id];
}
this.closed[id] = [];

@@ -438,2 +430,4 @@ this.closedA.push(id);

Manager.prototype.onClientDisconnect = function (id, reason) {
this.onDisconnect(id);
for (var name in this.namespaces) {

@@ -475,3 +469,3 @@ if (this.roomClients[id][name]) {

for (var room in this.roomClients[id]) {
this.rooms[room].splice(this.rooms.indexOf(id), 1);
this.rooms[room].splice(this.rooms[room].indexOf(id), 1);
}

@@ -818,6 +812,17 @@ }

Manager.prototype.handshakeData = function (data) {
var connectionAddress = null;
if (data.request.connection.address) {
connectionAddress = data.request.connection.address();
var connection = data.request.connection
, connectionAddress;
if (connection.remoteAddress) {
connectionAddress = {
address: connection.remoteAddress
, port: connection.remotePort
};
} else if (connection.socket && connection.socket.remoteAddress) {
connectionAddress = {
address: connection.socket.remoteAddress
, port: connection.socket.remotePort
};
}
return {

@@ -824,0 +829,0 @@ headers: data.headers

@@ -52,3 +52,3 @@ /**

var room = this.name + (room !== undefined ?
(this.name !== '' ? '/' : '') + room : '');
'/' + room : '');

@@ -113,3 +113,3 @@ if (!this.manager.rooms[room]) {

SocketNamespace.prototype.in = function (room) {
this.flags.endpoint = (this.name === '' ? '' : (this.name + '/')) + room;
this.flags.endpoint = this.name + (room ? '/' + room : '');
return this;

@@ -186,3 +186,3 @@ };

SocketNamespace.prototype.emit = function (name) {
if (name == 'connection' || name == 'newListener') {
if (name == 'newListener') {
return this.$emit.apply(this, arguments);

@@ -293,3 +293,3 @@ }

// emit connection event
self.emit('connection', socket);
self.$emit('connection', socket);
};

@@ -340,3 +340,3 @@

socket.emit('disconnect', packet.reason || 'packet');
socket.$emit('disconnect', packet.reason || 'packet');
break;

@@ -351,4 +351,4 @@

socket.emit.apply(socket, params);
socket.$emit.apply(socket, params);
};
};

@@ -18,3 +18,3 @@

exports.version = '0.7.6';
exports.version = '0.7.7';

@@ -21,0 +21,0 @@ /**

@@ -23,18 +23,2 @@

/**
* Reserved event names.
*/
var events = {
message: 1
, connect: 1
, disconnect: 1
, open: 1
, close: 1
, error: 1
, retry: 1
, reconnect: 1
, newListener: 1
};
/**
* Socket constructor.

@@ -153,3 +137,3 @@ *

if (!this.disconnected) {
this.emit('disconnect', reason);
this.$emit('disconnect', reason);
this.disconnected = true;

@@ -167,3 +151,3 @@ }

var nsp = this.namespace.name
, name = (nsp === '' ? '' : (nsp + '/')) + name;
, name = (nsp + '/') + name;

@@ -189,3 +173,3 @@ this.manager.onJoin(this.id, name);

var nsp = this.namespace.name
, name = (nsp === '' ? '' : (nsp + '/')) + name;
, name = (nsp + '/') + name;

@@ -300,9 +284,4 @@ this.manager.onLeave(this.id, name);

} else {
if (this.manager.open[this.id]) {
// if the connection is open in a different node
this.manager.store.publish('disconnect-force:' + this.id);
} else {
this.manager.onClientDisconnect(this.id);
this.manager.store.publish('disconnect:' + this.id);
}
this.manager.onClientDisconnect(this.id);
this.manager.store.publish('disconnect:' + this.id);
}

@@ -350,3 +329,3 @@ }

Socket.prototype.emit = function (ev) {
if (events[ev]) {
if (ev == 'newListener') {
return this.$emit.apply(this, arguments);

@@ -353,0 +332,0 @@ }

@@ -31,3 +31,2 @@

this.drained = true;
this.buffer = [];
this.handleRequest(req);

@@ -361,3 +360,3 @@ };

if (current && current.open) {
if (current) {
current.onForcedDisconnect();

@@ -367,2 +366,4 @@ } else {

}
return;
}

@@ -445,2 +446,3 @@

this.setCloseTimeout();
this.clearHandlers();
this.open = false;

@@ -460,3 +462,3 @@ this.manager.onClose(this.id);

if (!this.disconnected) {
this.log.info('ending socket');
this.log.info('transport end');

@@ -488,3 +490,2 @@ var local = this.manager.transports[this.id];

this.clearHandlers();
this.buffer = [];

@@ -491,0 +492,0 @@ return this;

{
"name": "socket.io"
, "version": "0.7.6"
, "description": "Realtime apps made cross-browser & easy with a WebSocket-like API"
, "version": "0.7.7"
, "description": "Real-time apps made cross-browser & easy with a WebSocket-like API"
, "homepage": "http://socket.io"

@@ -18,3 +18,3 @@ , "keywords": ["websocket", "socket", "realtime", "socket.io", "comet", "ajax"]

, "dependencies": {
"socket.io-client": "0.7.3"
"socket.io-client": "0.7.4"
, "policyfile": "0.0.3"

@@ -21,0 +21,0 @@ , "redis": "0.6.0"

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