portscanner
Advanced tools
Comparing version 0.2.3 to 1.0.0
@@ -67,2 +67,3 @@ var net = require('net') | ||
var timeout = options.timeout || 400 | ||
var connectionRefused = false; | ||
@@ -90,3 +91,7 @@ var socket = new Socket() | ||
socket.on('error', function(exception) { | ||
error = exception | ||
if(exception.code !== "ECONNREFUSED") { | ||
error = exception | ||
} | ||
else | ||
connectionRefused = true; | ||
status = 'closed' | ||
@@ -96,3 +101,7 @@ }) | ||
// Return after the socket has closed | ||
socket.on('close', function() { | ||
socket.on('close', function(exception) { | ||
if(exception && !connectionRefused) | ||
error = exception; | ||
else | ||
error = null; | ||
callback(error, status) | ||
@@ -99,0 +108,0 @@ }) |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "0.2.3", | ||
"version": "1.0.0", | ||
"preferGlobal": false, | ||
@@ -14,0 +14,0 @@ "homepage": "https://github.com/baalexander/node-portscanner", |
@@ -0,13 +1,12 @@ | ||
# node-portscanner | ||
## The What | ||
The portscanner module is | ||
an asynchronous JavaScript port scanner for Node.js. | ||
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. | ||
Portscanner can check a port, or range of ports, for 'open' or 'closed' | ||
statuses. | ||
## Install | ||
## The How | ||
### To Install | ||
```bash | ||
@@ -17,3 +16,3 @@ npm install portscanner | ||
### To Use | ||
## Usage | ||
@@ -46,15 +45,17 @@ A brief example: | ||
### To Test | ||
## Test | ||
Bleh. I am a fan of testing, but currently looking into an easier way to test | ||
several HTTP connections. If any ideas, please message me. | ||
There are currently no tests. | ||
If you have ideas, | ||
please open an issue. | ||
## The Future | ||
## Future | ||
Please create issues, or better yet, pull requests, for port scanning related | ||
features you'd like to see included. | ||
Please create issues or pull requests | ||
for port scanning related features | ||
you'd like to see included. | ||
## The License (MIT) | ||
## License (MIT) | ||
Released under the MIT license. See the LICENSE file for the complete wording. | ||
[MIT](LICENSE) | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
8583
135
0
60