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

synapsis

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

synapsis - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

2

package.json
{
"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 @@ });

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