ping-wrapper

0.0.3 • Public • Published

node-ping-wrapper

Ping wrapper for node - one process listening on stdout is spawned; inherits from EventEmitter

Usage:

var Ping = require('ping-wrapper');
 
 
// load configuration from file 'config-default-' + process.platform
// Only linux is supported at the moment
Ping.configure();
 
 
var ping = new Ping('127.0.0.1');
 
ping.on('ping', function(data){
    console.log('Ping %s: time: %d ms', data.host, data.time);
});
 
ping.on('fail', function(data){
    console.log('Fail', data);
});
 
 
// later you can call ping.stop()

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    45
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    45
  • 0.0.2
    1
  • 0.0.1
    1

Package Sidebar

Install

npm i ping-wrapper

Weekly Downloads

47

Version

0.0.3

License

none

Last publish

Collaborators

  • langpavel