| random_port {xfun} | R Documentation |
Find a random available TCP port
Description
Find an available TCP port, starting with port, then sampling from
3000–8000 (excluding ports known to be blocked by Chrome).
Usage
random_port(port = 4321L, n = 20L, exclude = NULL, error = TRUE)
Arguments
port |
Default port to try first. |
n |
Number of additional random ports to try. |
exclude |
Integer vector of ports to exclude from the search. |
error |
Whether to signal an error (default) or return |
Value
An integer port number. When error = TRUE (default), signals an
error if no port is found; when error = FALSE, returns NULL.
[Package xfun version 0.59 Index]