Set of ports that are marked as reserved. Can check if a port is available. Can return random or incremental free ports, with optional preferred default port.
Optional
Readonly
the number of (unique) elements in Set.
Static
Iterates over values in the set.
Appends a new element with a specified value to the end of the Set.
Removes a specified value from the Set.
Returns true if an element in the Set existed and has been removed, or false if the element does not exist.
Returns an iterable of [v,v] pairs for every value v in the set.
v
Executes a provided function once per each value in the Set object, in insertion order.
Return the preferred port number or the first free port after it.
Return the preferred port number or a random free port.
a boolean indicating whether an element with the specified value exists in the Set or not.
If a port is in use, mark it as reserved and return true. Otherwise unmark it as reserved and return false.
Return true if port is not in use.
Return true if port is not marked as reserved.
Return true if port is marked as reserved.
Despite its name, returns an iterable of the values in the set.
Check whether all ports that are marked as reserved are still reserved. Remove from the set of reserved ports those that are not in use anymore.
Mark a port as reserved.
Mark a port as reserved, throw if it's already in use.
Unmark a port as reserved, throw if it's still in use.
Unmark a port as reserved.
Returns an iterable of values in the set.
Generated using TypeDoc
Set of ports that are marked as reserved. Can check if a port is available. Can return random or incremental free ports, with optional preferred default port.