Comparing version 0.4.2 to 0.4.3
@@ -27,2 +27,8 @@ var EventEmitter = require('events').EventEmitter; | ||
self.remote = {}; | ||
do { | ||
self.id = Math.floor( | ||
Math.random() * Math.pow(2,32) | ||
).toString(16); | ||
} while (clients[self.id]); | ||
clients[self.id] = self.remote; | ||
@@ -128,10 +134,2 @@ // share an object or a function that builds an object | ||
clients[self.id] = self.remote; | ||
do { | ||
self.id = Math.floor( | ||
Math.random() * Math.pow(2,32) | ||
).toString(16); | ||
} while (self.id in clients); | ||
self.emit('remote', self.remote); | ||
@@ -138,0 +136,0 @@ self.emit('ready'); |
{ | ||
"name" : "dnode", | ||
"version" : "0.4.2", | ||
"version" : "0.4.3", | ||
"description" : "Transparently call remote callbacks", | ||
@@ -5,0 +5,0 @@ "modules" : { |
@@ -19,3 +19,4 @@ var DNode = require('dnode'); | ||
Server.prototype = new EventEmitter; | ||
function Server() { | ||
function Server (client, conn) { | ||
assert.ok(conn.id); | ||
var self = this; | ||
@@ -22,0 +23,0 @@ DNode.expose(self, 'on'); |
@@ -21,2 +21,3 @@ var DNode = require('dnode'); | ||
DNode.connect(port, function (remote, conn) { | ||
assert.ok(conn.id); | ||
assert.equal(conn.stream.remoteAddress, '127.0.0.1'); | ||
@@ -23,0 +24,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
105553
60
2342