Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this

This is very simple promise-based module to make system-level ping requests. Works in Windows / Linux / Mac.

Requirements

Node 8+

How to install

npm install system-ping

How to use

const ping = require( 'system-ping' );
ping( '127.0.0.1' ).then( ({ total, received }) => {
	console.log( `Sent ${total} packets, received ${received} packets` );
	if( total === received ){
		console.log( 'Ping was successful' );
	}
	else{
		console.warn( 'Some problems with host 127.0.0.1' );
	}
});

Options

ping( '127.0.0.1', { 'packetsCount': 8 } ) // How much packets to send for this ping

About

Very simple Node.js module to make system level ping. Windows, Linux, Max supported

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages