Socket
Socket
Sign inDemoInstall

dnode

Package Overview
Dependencies
Maintainers
0
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dnode - npm Package Compare versions

Comparing version 0.4.2 to 0.4.3

test/_id.js

14

lib/conn.js

@@ -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 @@

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