new PortScanner(options)
Scans ports based on the lan subnet, port and timeout specified in its parameters
Parameters:
Name | Type | Description |
---|---|---|
options |
JSON | Takes the following parameters- lan: The lan subnet, for example: 192.168.1 port: The port to be scanned timeout: The maximum time to listen for replies |
- Source:
Methods
scanPorts(callback)
Function that scans every machine on the local area
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | Callback which executes after all ports are scanned. Returns error,array of connected machines |
- Source:
(inner) checkPort(port, host, callback)
Function that checks connection with a specific host
Parameters:
Name | Type | Description |
---|---|---|
port |
Number | The port of the host to check; eg 8000 |
host |
String | The host to check connection with; eg 192.168.2.2 |
callback |
function | Callback which takes params error,status,host,port and socket |
- Source: