Native ping wrapper for node.js
JavaScript
Latest commit c3d6f60 Nov 30, 2015 @kittens 0.0.6
Permalink
Failed to load latest commit information.
LICENSE first commit Sep 28, 2014
README.md first commit Sep 28, 2014
example.js first commit Sep 28, 2014
index.js finished mac support + added time field since Mac/BSD ping doesn't ha… Nov 28, 2015
package.json 0.0.6 Nov 30, 2015

README.md

ping-wrapper

Native wrapper for ping.

Install

npm install ping-wrapper2

Example

var ping = require("ping-wrapper2");

var exec = ping("google.com", { count: 20 }); // default 10 packets

exec.on("data", function(data){
  // { no: 1, bytes: 64, time: 54, ttl: 1 }
    console.log(data);
});

exec.on("exit", function(data){
  // { sent: 10, recieved: 10, loss: 0, time: 9010 }
    console.log(data);
});