Comparing version 0.4.0 to 0.4.1
{ | ||
"name" : "riemann", | ||
"version" : "0.4.0", | ||
"version" : "0.4.1", | ||
"description" : "node.js client for Riemann, supports hybrid UDP/TCP connections.", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -19,4 +19,10 @@ # [Riemann](http://aphyr.github.com/riemann/) Node.js Client | ||
```js | ||
var client = require('riemann').createClient({ host: 'some.riemann.server', port: 5555 }); | ||
client.on('connect', function() { console.log('connected!'); }); | ||
var client = require('riemann').createClient({ | ||
host: 'some.riemann.server', | ||
port: 5555 | ||
}); | ||
client.on('connect', function() { | ||
console.log('connected!'); | ||
}); | ||
``` | ||
@@ -39,3 +45,5 @@ | ||
```js | ||
client.on('data', function(ack) { console.log('got it!'); }); | ||
client.on('data', function(ack) { | ||
console.log('got it!'); | ||
}); | ||
@@ -52,3 +60,5 @@ client.send(client.Event({ | ||
```js | ||
client.on('disconnect', function(){ console.log('disconnected!'); }); | ||
client.on('disconnect', function(){ | ||
console.log('disconnected!'); | ||
}); | ||
client.disconnect(); | ||
@@ -64,2 +74,2 @@ ``` | ||
- please add tests. I'm using [Mocha](http://visionmedia.github.com/mocha/) as a test runner, you can run the tests using `npm test` | ||
- please check your syntax with the included jshint configuration using `npm run-script lint`. It shouldn't report any errors. | ||
- please check your syntax with the included jshint configuration using `npm run-script lint`. It shouldn't report any errors. |
@@ -85,2 +85,6 @@ var assert = require('assert'); | ||
// proxy errors from TCP and UDP | ||
this.tcp.socket.on('error', function(error) { self.emit('error', error); }); | ||
this.udp.socket.on('error', function(error) { self.emit('error', error); }); | ||
this.tcp.onMessage(function(message) { | ||
@@ -87,0 +91,0 @@ self.emit('data', Serializer.deserializeMessage(message)); |
Sorry, the diff of this file is not supported yet
13665
235
72