New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bolt

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bolt - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

6

index.js
/*
* Mesh
* Cam Pedersen
* Sept 8, 2011
* Written on a plane from SFO to JFK
* bolt
* <cam@onswipe.com>
*/

@@ -7,0 +5,0 @@

@@ -55,2 +55,13 @@ var net = require('net'),

this.i.on('reconnecting', function(data){
that.log('info', 'redis', 'inbound reconnecting');
that.log('info', 'redis', ' attempt: ' + data.attempt);
that.log('info', 'redis', ' delay: ' + data.delay);
});
this.o.on('reconnecting', function(data) {
that.log('info', 'redis', 'outbound reconnecting');
that.log('info', 'redis', ' attempt: ' + data.attempt);
that.log('info', 'redis', ' delay: ' + data.delay);
});
this.i.on('subscribe', function(){

@@ -125,4 +136,5 @@ that.log('info', 'redis', 'inbound subscribed to ' + that.channel);

this.errorHandler.call(source, e);
} else {
throw new Error(e);
}
process.exit();
}

@@ -129,0 +141,0 @@

@@ -5,3 +5,3 @@ {

"description": "Send messages to any nodejs process, anywhere on the Internet.",
"version": "0.3.0",
"version": "0.3.1",
"homepage": "http://bolt.io/",

@@ -17,3 +17,3 @@ "repository": {

"dependencies": {
"redis": "*",
"redis": "0.7.1",
"colors": "*",

@@ -20,0 +20,0 @@ "eventemitter2": "*"

@@ -16,5 +16,5 @@ # bolt

- Authentication
- Event stream piping (soon)
- Remote Method Invocation (soon)
- Method sharting through function decomposition and reconstruction across nodes (soon)
- Event stream piping (soon) (pull request!)
- Remote Method Invocation (soon) (pull request!)
- Method sharing through function decomposition and reconstruction across nodes (soon) (pull request!)

@@ -29,17 +29,23 @@ ## install

var bolt = require('bolt');
````javascript
var bolt = require('bolt');
var mesh = new bolt.Node();
var mesh = new bolt.Node();
mesh.start();
mesh.start();
````
And then you can do things like this in one process:
mesh.emit('hello');
````javascript
mesh.emit('hello');
````
...and in another process:
mesh.on('hello', function(){
console.log('world');
});
````javascript
mesh.on('hello', function(){
console.log('world');
});
````

@@ -66,13 +72,15 @@ I'm working on getting more functionality in the examples folder, but those there should still prove useful.

{
host: '127.0.0.1',
port: 6357,
debug: false,
silent: false,
auth: undefined
}
````javascript
{
host: '127.0.0.1',
port: 6357,
debug: false,
silent: false,
auth: undefined
}
````
### node.start()
Create incoming and outgoing Redis connections, open the floddgates for events.
Create incoming and outgoing Redis connections, open the floodgates for events.

@@ -89,4 +97,10 @@ It is customary to define event listeners before calling this method.

### Working on support right now for other native EventEmitter methods such as `.once()`
You can provide an error handler for Bolt to prevent it from throwing:
````javascript
mesh.on('error', function (e) {
console.log(e);
});
````
## license

@@ -93,0 +107,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