This is a simple module to allow 'pinging' from WiFi enabled devices. While not true pinging, it opens a socket connection to the specified port and returns the time it takes to establish the connection.

This Module allows both URLs and IP Addresses.


ping(options, callback)

options is an object, which may contain several properties:

callback should be a function with arguments in node convention - function(err, data).

Returned data is an object which looks like this:

  "address": "",
  "port": 80, "attempts": 5, "avg": 36.86366081237, "max": 54.41212654113, "min": 29.13498878479,
  "raw": [ 29.13498878479, 54.41212654113, 34.74617004394, 32.61685371398, 33.40816497802 ]


var p = require("Ping");{ address: '' }, function(err, data) {

Reference = function (options, callback) { ... }


(No tutorials are available yet)

This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know.