osxreachability

0.3.2 • Public • Published

osxreachability

osxreachability allows to monitor a Mac's network reachability

Example usage:

  const reach = require('osxreachability');
   
  ...

  reach.Reachability.start(function(state){

	switch(state) {

		case reach.NOT_REACHABLE:
			// ...
			break;

		case reach.REACHABLE_WIFI:
			// ...
			break;
	}
  });

  ...
  
  reach.Reachability.stop();
 

It is important to call stop() in order to release the native reachability monitor's resources!

Readme

Keywords

Package Sidebar

Install

npm i osxreachability

Weekly Downloads

0

Version

0.3.2

License

MIT

Last publish

Collaborators

  • mderezynski