Learn R Programming

proffer (version 0.2.0)

random_port: Choose a random free TCP port.

Description

Choose a random free TCP port.

Usage

random_port(lower = 49152L, upper = 65535L)

Value

Port number, positive integer of length 1.

Arguments

lower

Integer of length 1, lower bound of the port number.

upper

Integer of length 1, upper bound of the port number.

Details

This function is a simple wrapper around parallelly::freePort() with the default port range covering ephemeral ports only.

Examples

Run this code
random_port()

Run the code above in your browser using DataLab