tar_random_port: Random TCP port

View source: R/utils_url.R View source: R/tar_random_port.R

tar_random_portR Documentation

Random TCP port

Description

Not a user-side function. Exported for infrastructure purposes only.

Not a user-side function. Exported for infrastructure purposes only.

Usage

tar_random_port(lower = 49152L, upper = 65355L)

tar_random_port(lower = 49152L, upper = 65355L)

Arguments

lower

Integer of length 1, lowest possible port.

upper

Integer of length 1, highest possible port.

Value

A random port not likely to be used by another process.

A random port not likely to be used by another process.

Examples

if (requireNamespace("parallelly", quietly = TRUE)) {
tar_random_port()
}
if (requireNamespace("parallelly", quietly = TRUE)) {
tar_random_port()
}

wlandau/targets documentation built on May 1, 2024, 7:27 p.m.