Created
November 24, 2014 15:06
-
-
Save ciwolsey/58624f720bdc4024ad42 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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