Comparing version 0.5.0 to 0.6.0
{ | ||
"name": "synapsis", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"description": "Automatic pub/sub over every possible network. It just works.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -61,4 +61,4 @@ | ||
// Broadcast a message to all nodes (w/o current) and receive messages from each (RPC like) | ||
synapse.broadcast('command:sync_db', { my : { db : true } }, function(err, response, identity) { | ||
console.log(`Err= ${err} Response = ${response} from = ${identity.name}`); | ||
synapse.broadcast('command:sync_db', { my : { db : true } }, function(err, response, socket) { | ||
console.log(`Err= ${err} Response = ${response} from = ${socket.identity.name}`); | ||
}); | ||
@@ -74,8 +74,8 @@ ``` | ||
synapse.send(peer.id, 'command:restart', function(err, data, identity) { | ||
console.log(err, data, identity); | ||
synapse.send(peer.id, 'command:restart', function(err, data, socket) { | ||
console.log(err, data, socket.identity); | ||
}); | ||
synapse.send(peer.id, 'command:restart', {mu : { db : true} }, function(err, data, identity) { | ||
console.log(err, data, identity); | ||
synapse.send(peer.id, 'command:restart', {mu : { db : true} }, function(err, data, socket) { | ||
console.log(err, data, socket.identity); | ||
}); | ||
@@ -82,0 +82,0 @@ ``` |
@@ -191,7 +191,7 @@ 'use strict'; | ||
return this._socket_pool[id].send(route, data, (err, data) => { | ||
return cb(err, data, this._socket_pool[id].identity); | ||
return cb(err, data, this._socket_pool[id]); | ||
}); | ||
return this._socket_pool[id].send(route, (err, data) => { | ||
return cb(err, data, this._socket_pool[id].identity); | ||
return cb(err, data, this._socket_pool[id]); | ||
}); | ||
@@ -211,7 +211,7 @@ }; | ||
return router.send(route, data, function(err, data) { | ||
cb(err, data, router.identity); | ||
cb(err, data, router); | ||
}); | ||
router.send(route, function(err, data) { | ||
cb(err, data, router.identity); | ||
cb(err, data, router); | ||
}); | ||
@@ -218,0 +218,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
23410