Skip to content

findPort

function · Source

Find an available port within a given range. Parameters

NameTypeDescription
minnumberThe minimum port number.
maxnumberThe maximum port number.
protocol?"udp4" | "udp6"The socket type. Default: "udp4".
interfaceAddresses?InterfaceAddressesThe interface addresses mapping.

Returns: Promise<number> — The available port within range.

Unofficial software. Not affiliated with or supported by Discord.