Comparing version 0.1.1 to 0.1.2
@@ -14,3 +14,3 @@ var HelpEsb = require('../help-esb'); | ||
console.warn(error); | ||
}); | ||
}).finally(client.close.bind(client)); | ||
@@ -17,0 +17,0 @@ client.on('type.error', function(err) { |
var HelpEsb = require('../help-esb'); | ||
var client = new HelpEsb.Client(process.env.ESB); | ||
client.login('bar'); | ||
client.send('asdf', {name: 'cool guy'}); | ||
client.send('asdf', {name: 'cool guy'}).finally(client.close.bind(client)); | ||
@@ -6,0 +6,0 @@ client.on('type.error', function(err) { |
@@ -122,2 +122,3 @@ (function(root, factory) { | ||
// | ||
// client.subscribe('foo-result'); | ||
// client.rpcSend('foo', {name: 'John'}).then(function(response) { | ||
@@ -182,2 +183,8 @@ // console.log(response); | ||
// ### HelpEsb.Client.close | ||
// Closes the connection, ending communication. | ||
HelpEsb.Client.prototype.close = function() { | ||
this._socket.end(); | ||
} | ||
// --- | ||
@@ -184,0 +191,0 @@ // ### Private Methods |
{ | ||
"name": "help-esb", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A client for the Help.com team's ESB.", | ||
@@ -5,0 +5,0 @@ "main": "help-esb.js", |
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
20461
308