getPortsAvailable(...args)

Filters a candidate list of ports and returns only those available.

getPortsAvailable(ports, portsLen)

Parameters

  • ports (Uint32Array) – Candidate ports.

  • portsLen (number) – Array length.

Return Value

number[] or Buffer

Example

// example

const cand = new Uint32Array([8000, 8001, 8002]);
const available = sdk.getPortsAvailable(cand, cand.length);
console.log("available: ", available)

Last updated

Was this helpful?