portscanner

WebJar for portscanner

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

portscanner
Последняя версия

Последняя версия

2.1.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

portscanner
WebJar for portscanner
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/baalexander/node-portscanner

Скачать portscanner

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/portscanner/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>portscanner</artifactId>
    <version>2.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/portscanner/
implementation 'org.webjars.npm:portscanner:2.1.1'
// https://jarcasting.com/artifacts/org.webjars.npm/portscanner/
implementation ("org.webjars.npm:portscanner:2.1.1")
'org.webjars.npm:portscanner:jar:2.1.1'
<dependency org="org.webjars.npm" name="portscanner" rev="2.1.1">
  <artifact name="portscanner" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='portscanner', version='2.1.1')
)
libraryDependencies += "org.webjars.npm" % "portscanner" % "2.1.1"
[org.webjars.npm/portscanner "2.1.1"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.webjars.npm : async jar 1.5.2
org.webjars.npm : is-number-like jar [1.0.3,2)

Модули Проекта

Данный проект не имеет модулей.

portscanner

npm JavaScript Style Guide

The portscanner module is an asynchronous JavaScript port scanner for Node.js.

Portscanner can check a port, or range of ports, for 'open' or 'closed' statuses.

Looking for maintainer!

Install

npm install portscanner

Usage

A brief example:

var portscanner = require('portscanner')

// Checks the status of a single port
portscanner.checkPortStatus(3000, '127.0.0.1', function(error, status) {
  // Status is 'open' if currently in use or 'closed' if available
  console.log(status)
})

// Find the first available port. Asynchronously checks, so first port
// determined as available is returned.
portscanner.findAPortNotInUse(3000, 3010, '127.0.0.1', function(error, port) {
  console.log('AVAILABLE PORT AT: ' + port)
})

// Find the first port in use or blocked. Asynchronously checks, so first port
// to respond is returned.
portscanner.findAPortInUse(3000, 3010, '127.0.0.1', function(error, port) {
  console.log('PORT IN USE AT: ' + port)
})

// You can also pass array of ports to check
portscanner.findAPortInUse([3000, 3005, 3006], '127.0.0.1', function(error, port) {
  console.log('PORT IN USE AT: ' + port)
})

// And skip host param. Default is '127.0.0.1'
portscanner.findAPortNotInUse(3000, 4000, function(error, port) {
  console.log('PORT IN USE AT: ' + port)
})

// And use promises
portscanner.findAPortNotInUse(3000, 4000).then(function(port) {
  console.log('PORT IN USE AT: ' + port)
})

The example directory contains a more detailed example.

Test

npm test

Future

Please create issues or pull requests for port scanning related features you'd like to see included.

License (MIT)

MIT

Версии библиотеки

Версия
2.1.1
1.0.0