Skip to content

randomPorts

function · Source

Get multiple random available ports. Parameters

NameTypeDescription
numnumberNumber of ports to find.
protocol?"udp4" | "udp6"The socket type. Default: "udp4".
interfaceAddresses?InterfaceAddressesThe interface addresses mapping.

Returns: Promise<Array<number>> — An array of assigned random ports.

Unofficial software. Not affiliated with or supported by Discord.