Skip to content

Instantly share code, notes, and snippets.

@ciwolsey
Created November 24, 2014 15:06
Show Gist options
  • Save ciwolsey/58624f720bdc4024ad42 to your computer and use it in GitHub Desktop.
Save ciwolsey/58624f720bdc4024ad42 to your computer and use it in GitHub Desktop.
var ping = Meteor.npmRequire('ping');
// Just to show how async ping works
ping.sys.probe("127.0.0.1", function(hostStatus) {
console.log(hostStatus);
});
// Two different ways of wrapping
var wrappedPingA = Async.wrap(ping.sys.probe);
var wrappedPingB = Meteor.wrapAsync(ping.sys.probe);
// Both of these fail
wrappedPingA("127.0.0.1");
wrappedPingB("127.0.0.1");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment