Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    ping-wrapperpublic

    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()

    Keywords

    none

    install

    npm i ping-wrapper

    Downloadsweekly downloads

    89

    version

    0.0.3

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar