Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
danielzzz committed Nov 23, 2011
1 parent 5e4b8a7 commit 9ddf3bd
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions README
@@ -1,17 +1,21 @@
NODE-PING
A poor man's ping for nodejs
a ping wrapper for nodejs

LICENSE MIT
(C) Daniel Zelisko
http://github.com/danielzzz/node-ping

DESCRIPTION
node-ping uses UDP_scanning http://en.wikipedia.org/wiki/Port_scanner#UDP_scanning (as node is not able to generate iCPM packets)
it may not work correct for hosts that silently drop UDP traffic on their firewall
you need at pcap version 0.1.9 or higher

on the other hand, ping-sys is a simple wrapper for the system ping utility
node-ping is a simple wrapper for the system ping utility

USAGE
sudo node ping.js [interface] [host]
var ping = require('ping');

var hosts = ['192.168.1.1', 'google.com', 'yahoo.com'];
hosts.forEach(function(host){
ping.sys.probe(host, function(isAlive){
var msg = isAlive ? 'host ' + host + ' is alive' : 'host ' + host + ' is dead';
console.log(msg);
});
});

0 comments on commit 9ddf3bd

Please sign in to comment.