Skip to content

randomPort

function · Source

Get a random available port. Parameters

NameTypeDescription
protocol?"udp4" | "udp6"The socket type. Default: "udp4".
interfaceAddresses?InterfaceAddressesThe interface addresses mapping.

Returns: Promise<number> — The assigned random port.

Unofficial software. Not affiliated with or supported by Discord.