Socket
Book a DemoInstallSign in
Socket

httping

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

httping

an anti-idling/pinging tool [originally built for heroku]

1.1.7-0
latest
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

Pinger

Setup

const Pinger = require('httping'),
pinger = new Pinger(url, [minimumInterval = 5000, maximumInterval = 5000, times = Infinity, protocol = "GET", callback = (...args) => { }]);
pinger.start();

If maximumInterval and next parameters are not passed, maximumInterval is automatically set to minimumInterval's value and thus the pinging interval is fixed.

Properties/Methods

  • ping(url = "localhost", meth = "GET", cb = () => {}) (static) -> Ping a specific url simultaneously.
  • start() -> Start pinging. Throws an error if pinger is already active.
  • stop() -> Stop pinging. Won't reset times.
  • ping() -> Force-Ping (once, simultaneously).
  • restart() -> kill.stop(); ping.start();
  • kill() -> Stops and resets timer.
    All methods return this for chaining apart from ping()'s that return a Request object.

This module creates the hping shortcut (optional) binary.

CLI

Pass pinger parameters either as environmental (url, inter, inter2, times, method) or as arguments (hping http://www.google.com 5000-6000 100 GET).
After invocing the command hping the cli accepts the following commands.

  • stop|pause -> Pause pinger.
  • exit|quit|close -> Close pinger.
  • [re]start -> Start pinger.
  • Everything else is eval'd

Keywords

heroku

FAQs

Package last updated on 21 Jun 2018

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.