Debian Codegraph @

man/random_port.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/app.R
3 \name{random_port}
4 \alias{random_port}
5 \title{Find a random available TCP port}
6 \usage{
7 random_port(port = 4321L, n = 20L, exclude = NULL, error = TRUE)
8 }
9 \arguments{
10 \item{port}{Default port to try first.}
11
12 \item{n}{Number of additional random ports to try.}
13
14 \item{exclude}{Integer vector of ports to exclude from the search.}
15
16 \item{error}{Whether to signal an error (default) or return \code{NULL} when no
17 port is found.}
18 }
19 \value{
20 An integer port number. When \code{error = TRUE} (default), signals an
21 error if no port is found; when \code{error = FALSE}, returns \code{NULL}.
22 }
23 \description{
24 Find an available TCP port, starting with \code{port}, then sampling from
25 3000--8000 (excluding ports known to be blocked by Chrome).
26 }