Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

pingwrap

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pingwrap

Small wrapper to ping servers

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

Node.js Ping utility

A easy to use utility for node.js to send ping requests

##Installation

Make sure you have the latest node, coffee-script and npm installed. To run:

$ coffee app.coffee

For those coffee haters, I have compiled it to native javascript. To run:

$ node app.js

Usage

First include it to your application

var ping = require('./lib/ping');

You can then call the ping function by passing it two arguments:

ping( [hostname/ip], [callback] );

Example:

sys = require('util');
ping = require('./lib/ping');

ping('google.com', function(error, stdout, stderr) {
  return sys.puts(stdout);
});

FAQs

Package last updated on 25 Apr 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts