Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

icmp

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

icmp - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

4

example/ping.js

@@ -1,2 +0,2 @@

const icmp = require('icmp');
const icmp = require('../');
const readline = require('readline');

@@ -18,5 +18,5 @@

} catch (e) {
console.log(host, 'Error');
console.log(host, console.log(e));
}
}, 1000);
});

@@ -31,3 +31,3 @@ const raw = require('raw-socket');

if (!this.ip) {
if (net.isIPv4(this.ip)) {
if (net.isIPv4(this.host)) {
this.ip = this.host;

@@ -68,9 +68,11 @@ return resolve();

this.start = process.hrtime()[1];
this.start = process.hrtime();
});
this.socket.on('message', (buffer, source) => {
this.end = process.hrtime()[1];
this.elapsed = (this.end - this.start) / 1000000;
const NS_PER_SEC = 1e9;
this.diff = process.hrtime(this.start);
this.elapsed = (this.diff[0] + this.diff[1] / NS_PER_SEC) * 1000;
const offset = 20;

@@ -77,0 +79,0 @@ const type = buffer.readUInt8(offset);

{
"name": "icmp",
"version": "1.3.1",
"version": "1.3.2",
"description": "Internet Control Message Protocol in Node",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc