Methods
(static) getFreePort(address, port) → {Promise.<port>}
Finds a free TCP port starting from the given port, incremented by one.
Parameters:
Name | Type | Description |
---|---|---|
address |
string | Address to search on |
port |
number | Port to start searching from |
- Source:
Returns:
- Type
- Promise.<port>
(static) getIfData(ifaceopt) → {IfaceData}
Returns IPv4 interface data from the given interface or IPv4 address, or searches for a public
interface with an assigned IPv4. Also calculates the network and broadcast address of the
interface.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
iface |
string |
<optional> |
Optional interface or IPv4 address to check |
- Source:
Returns:
- Type
- IfaceData
(static) ipInSubnet(ip, network, netmask) → {boolean}
Checks if a given IP is in the subnet of the given network address and netmask.
Parameters:
Name | Type | Description |
---|---|---|
ip |
string | Ip that should be checked |
network |
string | Network address |
netmask |
string | Netmask |
- Source:
Returns:
- Type
- boolean