pinguin
Just another ping wrapper for nodejs.
Motivation
Actually, pinguin is a fork of node-ping. It's awesome, but maintenance of this package leaves much to be desired. Usually, they merge PRs very rarely. Moreover, this package doesn't support NodeJS standard events mechanism. For now, pinguin
is fully equaled the source package.
Installation
npm install pinguin
Usage
Below are examples extracted from examples
Tradition calls
var ping = ; var hosts = '192.168.1.1' 'google.com' 'yahoo.com';hosts;
Tradition calls with configuration
var cfg = timeout: 10 // WARNING: -i 2 may not work in other platform like window extra: '-i' '2'; hosts;
Promise wrapper
var ping = ; var hosts = '192.168.1.1' 'google.com' 'yahoo.com'; hosts;
Promise Wrapper with configable ping options
hosts;
Support configuration
Below is the possible configuration
/** * Cross platform config representation * @typedef * @property * @property * @property * @property */
Output specification
- For callback based implementaiton:
/** * Callback after probing given host * @callback probeCallback * @param * @param */
- For promise based implementation
/** * Parsed response * @typedef * @param * @param * @param * @param * @param * @param * @param * @param * @param * @param */